Interrupt a long-running query
#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, and rolls back any uncommitted transactions. If qdb_interrupt() is called on a connection where no query is executing, it doesn'thing.
If the connection to QDB is synchronous, this function must be called from a separate thread from the one that initiated the query. In asynchronous mode (see "Using asynchronous mode"), this function may be called from the same thread.
If a query is nearly finished at the time when qdb_interrupt() is called, then it might not have an opportunity to be interrupted and might continue to completion.
The qdb_interrupt() call is in effect until all currently running queries using the specified connection handle complete or are successfully interrupted. Any queries that are started after the qdb_interrupt() call and before the number of currently running queries reaches zero are interrupted as if they had been running prior to the qdb_interrupt() call. New queries that are started after the count of currently running queries reaches zero are not affected by qdb_interrupt().
QNX Neutrino
Safety: | |
---|---|
Interrupt handler | No |
Signal handler | No |
Thread | Yes |