sqlite3, memory db and multithreading

Tim Golden mail at timgolden.me.uk
Fri Mar 19 07:10:29 EDT 2010


On 19/03/2010 10:56, królewna wrote:
> W dniu 18.03.2010 23:06, Aahz pisze:
>>
>> You probably need to serialize access to the database through one thread.
>
> sqlite3 objects are not pickable so it's not proper way.

Is it possible you've misunderstood the meaning of the word "serialize"
here? What's being suggested isn't serialising (ie marshalling, pickling)
the data; rather, serialising the *access*, ie pushing all db requests into
a queue which is read by one thread which manages the only db connection.

TJG



More information about the Python-list mailing list