SQLite Forum

Multi-threaded non-serialization
Login
> Note that setting the NOMUTEX flag enables "multi thread" mode, which allows concurrent access by multiple threads, each using their own connection.

This is incorrect.  Unless you have set single-thread mode you can use multiple threads.  You can always use one connection per thread without incurring serialized connection access waits except in single-thread mode.

There are two levels of mutex protection.  

One set of mutexes protect the "connection" related data (which includes statements, since they are children of a connection) from multiple simultaneous access by multiple threads.

A second set of mutexes protect the "global data" which may be accessed by all connections (not connection specific).

Setting "multi-thread" / NOMUTEX disables the mutexes on the connection.  
Setting "single-thread" disables all mutexes.

Disabling mutexes simply saves the few nanoseconds that it takes to check the mutex ownership, the associated kernel transitions, and (possibly) running kernel dispatcher.