Name
sqlite3_unlock_notify() — Install an unlock notification callback [EXP]
Definition
int sqlite3_unlock_notify( sqlite* db, notify_callback, void* arg ); void notify_callback( void** argv, int argc );
-
db A database connection.
-
notify_callback The unlock notification callback function.
-
arg An application-specific notification record.
-
argv An array of notification records.
-
argc The number of notification records.
- Returns (
sqlite3_unlock_notify()) An SQLite result code.
Description
This function registers an unlock notification callback. This
can only be used in shared cache mode. If a database connection
returns an SQLITE_LOCKED
error, the application has a chance to install an unlock
notification callback. This callback will be called when the
lock becomes available, giving the callback a chance to process
all of the outstanding notification records.
This is an advanced API call that requires significant understanding of the threading and locking modes used by a shared cache. For more information, see http://www.sqlite.org/unlock_notify.html.
This function is only available if the SQLite library was
compiled with the SQLITE_ENABLE_UNLOCK_NOTIFY build
option.
See Also
SQLITE_ENABLE_UNLOCK_NOTIFY [Build Opt, Ap A]
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access