On Tue, Jan 02, 2007 at 11:56:42PM +0000, Emerson Clarke wrote:
> The single connection multiple thread alternative apparently has
> problems with sqlite3_step being active on more than one thread at the
> same moment, so cannot easily be used in a safe way.  But it is by far
> the fastest and simplest alternative.

No, not "apparently" -- it _does_.  What you should do is keep a set of
db contexts and assign them to clients/connections and make sure that
each clients/connections is only every serviced by one thread at a time.

One way to do this is to classify incoming messages, select an existing
object representing that client/connection/whatever or create a new one,
then queue the new message in that object and queue this object up for
dispatch to a worker thread.

Cheers,

Nico
-- 

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to