Re: [sqlite] is the sqlite3's C-api used in thread-safety mode ? or non-reentrant?

2009-07-10 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Pavel Ivanov wrote: > Roger, note that OP is talking about re-entrance, not thread-safety. > He wants to know which functions can be called from signal handlers > which can be called in the middle of some other SQLite call in the > same thread. I

Re: [sqlite] is the sqlite3's C-api used in thread-safety mode ? or non-reentrant?

2009-07-10 Thread Pavel Ivanov
> SQLite does the right thing > for multi-threaded applications and many use it that way - you are not > the first. Roger, note that OP is talking about re-entrance, not thread-safety. He wants to know which functions can be called from signal handlers which can be called in the middle of some

Re: [sqlite] is the sqlite3's C-api used in thread-safety mode ? or non-reentrant?

2009-07-10 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 liubin liu wrote: > How could I know which SQLite3's api is reentrant? As a general rule they all are. The documentation page for each api gives further details and considerations. SQLite does the right thing for multi-threaded applications and

Re: [sqlite] is the sqlite3's C-api used in thread-safety mode ? or non-reentrant?

2009-07-10 Thread liubin liu
How could I know which SQLite3's api is reentrant? Pavel Ivanov-2 wrote: > > Why do you re-post your code as if it's another question not related > to previous one (along with the answer)? > >> does it mean that the sqlite3's C-api isn't reentrant or thread-safety? > > If SQLite is compiled

Re: [sqlite] is the sqlite3's C-api used in thread-safety mode ? or non-reentrant?

2009-07-09 Thread liubin liu
Thank you very much for your post Just after I post the last code I know the concept of "reentrant" and "thread-safety". And you should notice the wrong usage of printf() in signal handle func. ^_^ So I re-writed the code and re-test. And the problem is still in someplace. So I re-post the

Re: [sqlite] is the sqlite3's C-api used in thread-safety mode ? or non-reentrant?

2009-07-09 Thread Pavel Ivanov
Why do you re-post your code as if it's another question not related to previous one (along with the answer)? > does it mean that the sqlite3's C-api isn't reentrant or thread-safety? If SQLite is compiled with SQLITE_THREADSAFE = 1 or 2 then API is thread-safe (with some limitations when it's

[sqlite] is the sqlite3's C-api used in thread-safety mode ? or non-reentrant?

2009-07-09 Thread liubin liu
does it mean that the sqlite3's C-api isn't reentrant or thread-safety? #include // for printf() #include // for signal() #include // for alarm() #include // for system() #include // for pthread_create()