|
|
|
SQLite offers 3 threading modes:
|
|
|
|
* Single threaded which is quite self explanatory and doesn't work at all for us
|
|
|
|
* Serialized, where the SQLite engine will handle serializing accesses to the database itself, meaning all requests will run one after another (which was not successful when tested, but that might be a problem at the time, or an implementation problem)
|
|
|
|
* Multithread where the application is responsible for orchestrating the requests and ensure that no concurrent write will occur.
|
|
|
|
|
|
|
|
The media library uses the later, and has a set of tools to acquire read or write contexts and simplify the accesses to the database from a multi threaded context.
|
|
|
|
|
|
|
|
Read context
|
|
|
|
============
|
|
|
|
|
|
|
|
As the name imply, this is a context that must be used when reading from the database. |
|
|
\ No newline at end of file |