Interrupt long-running queries
#include <qdb/qdb.h> int qdb_interrupt( qdb_hdl_t *db );
qdb
This function interrupts all currently running queries that are using the specified connection handle (db) and rolls back any uncommitted transactions. If qdb_interrupt() is called on a connection when no query is executing, it doesn't do anything.
If the QDB connection is synchronous, you must call this function in a thread other than the one that initiated the query. In asynchronous mode, this function may be called from the same thread.
If a query is nearly finished when you call this function, the query might not get interrupted and instead finish executing.
The qdb_interrupt() call is active until all currently running queries associated with db either finish executing or are successfully interrupted. For queries started after the qdb_interrupt() call was issued but before the count of active queries reaches 0, they're interrupted as if they had been running prior to the call. Any queries started after the active query count reaches 0 aren't affected by this function.
QNX Neutrino
Safety: | |
---|---|
Interrupt handler | No |
Signal handler | No |
Thread | Yes |