Richard,

Sorry to bring this up again, but ive just finished testing the
alternative strategies.

Having coded all 3 versions i still have a question about the
sqlite3_step() problem which i think was isolated as the cause of my
trouble a few days ago.

Firstly can i clarify what you mean regarding the same moment.  Do you
mean that no two threads can be executing the call, or that no two
threads can be in the middle of stepping through a series of results
using the step function (assuming there is some context behind the
scenes).  Even if the threads involved are synchronised.  I treat all
of the api functions as synchronisation boundaries, so i would never
allow two threads to call an api function at the same time.

The reason i ask is because i assume it is ok to have multiple
statements performing a sqlite3_step() at the same time in a single
threaded environment.   I know that internally sqlite turns everything
into prepared statements and executes them using sqlite3_step(). And
if this is the case, then in a multithreaded environment it should
still be the same so long as things were synchronised ?

Im confused because ive been told that it doesnt work, and i guess i
just dont understand what is internally preventing it from doing so...

Emerson

On 12/30/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Joe Wilson <[EMAIL PROTECTED]> wrote:
> --- [EMAIL PROTECTED] wrote:
> > SQLite allows you to have multiple queries running at the
> > same time in multiple threads, as long as no two threads are
> > running sqlite3_step() at the same moment.
>
> Do you mean "as long as no two threads are running sqlite3_step()
> _for the same sqlite3* connection_ at the same moment"?
>

Yes.
--
D. Richard Hipp  <[EMAIL PROTECTED]>


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



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

Reply via email to