Name

sqlite3_interrupt() — Cancel any in-progress database operations.

Definition

void sqlite3_interrupt( sqlite3* db );
db

A database connection.

Description

This function causes all currently running statements to abort at their earliest convenience. It is safe to call this from a different thread. Interrupted functions will return SQLITE_INTERRUPT. If the interrupted function is modifying the database file and is inside an explicit transaction, the transaction will be rolled back. The interrupt state will continue until the active statement count reaches zero.

This function should not be called if the database connection may be closed. A crash is likely if the database connection is closed while an interrupt is still outstanding.

See Also

sqlite3_close()

Get Using SQLite now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.