|
int sqlite3_threadsafe(void);
The sqlite3_threadsafe() routine returns nonzero if SQLite was compiled with its mutexes enabled or zero if SQLite was compiled with mutexes disabled. If this routine returns false, then it is not safe for simultaneously running threads to both invoke SQLite interfaces.
Really all this routine does is return true if SQLite was compiled with the -DSQLITE_THREADSAFE=1 option and false if compiled with -DSQLITE_THREADSAFE=0. If SQLite uses an application-defined mutex subsystem, malloc subsystem, collating sequence, VFS, SQL function, progress callback, commit hook, extension, or other accessories and these add-ons are not threadsafe, then clearly the combination will not be threadsafe either. Hence, this routine never reports that the library is guaranteed to be threadsafe, only when it is guaranteed not to be.
See also lists of Objects, Constants, and Functions.