sqlite3_mutex* sqlite3_db_mutex( sqlite3* db );
db
A database connection.
The database connection mutex lock. If the library is not in the “serialized” threading mode, a NULL pointer will be returned.
This function extracts and returns a reference to the mutual exclusion lock associated with the given database connection. The SQLite library must be in the “serialized” threading mode. If it is in any other mode, this function will return NULL.
The mutex object can be used to lock the database connection for the purpose of avoiding race conditions, especially when accessing error messages or row counts that are stored as part of the database connection.