According to sqlite3_open documentation, only the thread that opened the database can safely access it. This restriction was relaxed, as described in the FAQ (the "Is SQLite threadsafe?" question), so we can use the library from multiple threads, but only if no more than one thread at a time accesses the database. This restriction is, in fact, beneficial if the database is used from a single application: by restricting access to a sigle thread at a time, we effectively avoid all deadlock issues.
This library goals are:
- to ensure that SQLite is used in a thread-safe way,
- to provide additional threaded quirks, such as delayed updates (not implemented).
The library is targeted at SQLite setup which is not
-DTHREADSAFE, since this is the default setup on UNIX architectures.
This file is a header-only library, whose sole dependencies should be standard STL and posix threading libraries. You can extract this file out of the "glim" library to include it separately in your project.
This library is targeted at UTF-8 API. There is no plans to support the UTF-16 API.