Gwendal Roué wrote:
>> Le 16 août 2017 à 08:38, Clemens Ladisch <[email protected]> a écrit :
>> Gwendal Roué wrote:
>>> Serialized accesses from multiple threads is OK when the connection is
>>> in the "Multi-thread" or "Serialized" threading modes, but not in the
>>> "Single-thread" threading mode.
>>
>> <http://www.sqlite.org/threadsafe.html> says:
>> | 1. *Single-thread*. In this mode, all mutexes are disabled and SQLite
>> |    is unsafe to use in more than a single thread at once.
>>
>> When the accesses are serialized, they are not _at once_.
>
> According to your interpretation, "Single-thread" and "Multi-thread" modes 
> are equivalent:
>
>> Multi-thread. In this mode, SQLite can be safely used by multiple threads
>> provided that no single database connection is used simultaneously in two
>> or more threads.

"Multi-thread" mode allows concurrent accesses to different connections
(which might end up accessing the same internal, global variables).

When all accesses are serialized, there are not concurrent accesses at all.

> Finally, we don't know which threading mode the OP is using.

Serializing everything, as the OP is doing, is safe in any mode.


Regards,
Clemens
_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to