Re: [sqlite] Thread safety guarantees

2005-09-04 Thread Ron Avriel
On 9/4/05, Christopher R. Palmer <[EMAIL PROTECTED]> wrote: > > Unfortunately, that's not the case. The code that was being used when I > created ticket 1272 was very simple. In the main thread, I opened a > handle for each thread. Each thread then worked independently using > only their own handl

Re: [sqlite] Thread safety guarantees

2005-09-04 Thread Christopher R. Palmer
Ron Avriel wrote: On 9/3/05, D. Richard Hipp <[EMAIL PROTECTED]> wrote: This is not portable. Some operating systems (ex: RedHat) will cause intermittent problems if the same SQLite handle is used by more than one thread. The program will seem to work initially but will begin to exhibit unre

Re: [sqlite] Thread safety guarantees

2005-09-04 Thread Ron Avriel
On 9/3/05, D. Richard Hipp <[EMAIL PROTECTED]> wrote: > > This is not portable. Some operating systems (ex: RedHat) > will cause intermittent problems if the same SQLite handle > is used by more than one thread. The program will seem to > work initially but will begin to exhibit unreproducible > e

Re: [sqlite] Thread safety guarantees

2005-09-03 Thread René Tegel
D. Richard Hipp wrote: This is not portable. Some operating systems (ex: RedHat) will cause intermittent problems if the same SQLite handle is used by more than one thread. I am aware that this solution may work right on windows only. On the other hand it is to fix behaviour that typically oc

Re: [sqlite] Thread safety guarantees

2005-09-03 Thread D. Richard Hipp
On Sat, 2005-09-03 at 12:58 +0200, René Tegel wrote: > Just for your information, i've written an multi-threaded application > that accesses a sqlite database (well four of them in fact). All > threads > (many) use the same handle as retrieved from sqlite open. This is not portable. Some operat

Re: [sqlite] Thread safety guarantees

2005-09-03 Thread René Tegel
Hi, Just for your information, i've written an multi-threaded application that accesses a sqlite database (well four of them in fact). All threads (many) use the same handle as retrieved from sqlite open. Each thread locks the database by entering a critical section, performs a query, fetches

Re: [sqlite] Thread safety guarantees

2005-09-02 Thread Cory Nelson
I can't speak for Linux but as long as only one thread is working on a connection at once, Windows is fine. On 9/2/05, Igor Tandetnik <[EMAIL PROTECTED]> wrote: > I'm trying to piece together the thread safety guarantees that SQLite > provides. They don't appear to be spelled out explicitly. So I'

[sqlite] Thread safety guarantees

2005-09-02 Thread Igor Tandetnik
I'm trying to piece together the thread safety guarantees that SQLite provides. They don't appear to be spelled out explicitly. So I'm trying to infer the rules from the documents describing SQLite internals, as well as the recent "file locks on linux have thread affinity" story. Here is my un