Name
sqlite3_mutex_try() — Attempt to acquire a mutex lock
Definition
int sqlite3_mutex_try( sqlite3_mutex* mutex );
-
mutex A mutual exclusion lock.
- Returns
The value
SQLITE_OKis returned if the lock was acquired. Otherwise,SQLITE_BUSYwill be returned.
Description
This function attempts to acquire a mutual exclusion lock for
the current thread. If the lock is acquired, SQLITE_OK will be returned. If
the lock is held by another thread, SQLITE_BUSY will be returned. If a NULL mutex
pointer is passed in, the function will return SQLITE_OK.
This function is not supported by all threading libraries. If
SQLite has thread support, but this function is not supported, a
valid mutex will always result in an SQLITE_BUSY return code.
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