Re: [sqlite] SQLITE_THREADSAFE question

2014-09-07 Thread Roger Binns
On 04/09/14 06:59, Neo Anderson wrote: > I'm building a custom library wrapper for Cocoa. I want to handle database > threading issue myself. One gotcha not documented in the threading pages is that the SQLite error handling APIs are not threadsafe, and the only correct way of handling errors

Re: [sqlite] SQLITE_THREADSAFE question

2014-09-04 Thread Neo Anderson
Understood. Thanks! > From: d...@sqlite.org > Date: Thu, 4 Sep 2014 11:42:52 -0400 > To: sqlite-users@sqlite.org > Subject: Re: [sqlite] SQLITE_THREADSAFE question > > On Thu, Sep 4, 2014 at 11:32 AM, Neo Anderson <neo_in_mat...@msn

Re: [sqlite] SQLITE_THREADSAFE question

2014-09-04 Thread Richard Hipp
On Thu, Sep 4, 2014 at 11:32 AM, Neo Anderson wrote: > Got confused. if I have SQLITE_THREADSAFE=2, do I need to implement mutex > proection around this function call? > No. -- D. Richard Hipp d...@sqlite.org ___ sqlite-users

Re: [sqlite] SQLITE_THREADSAFE question

2014-09-04 Thread Neo Anderson
Got confused. if I have SQLITE_THREADSAFE=2, do I need to implement mutex proection around this function call? > From: d...@sqlite.org > Date: Thu, 4 Sep 2014 10:18:29 -0400 > To: sqlite-users@sqlite.org > Subject: Re: [sqlite] SQLITE_THREADS

Re: [sqlite] SQLITE_THREADSAFE question

2014-09-04 Thread Richard Hipp
On Thu, Sep 4, 2014 at 10:14 AM, Neo Anderson wrote: > > 2. Fuctions that do not use sqlite3* and sqite3_stmt* such as > sqlite3_mprintf do not need mutex protection. > No. sqlite3_mprintf() does require mutex protection. If you disable mutexes using SQLITE_THREADSAFE=0

Re: [sqlite] SQLITE_THREADSAFE question

2014-09-04 Thread Neo Anderson
. > From: d...@sqlite.org > Date: Thu, 4 Sep 2014 10:07:02 -0400 > To: sqlite-users@sqlite.org > Subject: Re: [sqlite] SQLITE_THREADSAFE question > > On Thu, Sep 4, 2014 at 9:59 AM, Neo Anderson <neo_in_mat...@msn.com> wrote: > >&

Re: [sqlite] SQLITE_THREADSAFE question

2014-09-04 Thread Richard Hipp
On Thu, Sep 4, 2014 at 9:59 AM, Neo Anderson wrote: > I'm building a custom library wrapper for Cocoa. I want to handle database > threading issue myself. > > From http://sqlite.org/compile.html#threadsafe: > > [quote] > When compiled with SQLITE_THREADSAFE=2, SQLite can

[sqlite] SQLITE_THREADSAFE question

2014-09-04 Thread Neo Anderson
I'm building a custom library wrapper for Cocoa. I want to handle database threading issue myself. >From http://sqlite.org/compile.html#threadsafe: [quote] When compiled with SQLITE_THREADSAFE=2, SQLite can be used in a multithreaded program so long as no two threads attempt to use the sameĀ