Hello Voxen, Monday, October 2, 2006, 2:13:39 PM, you wrote:
V> Greetings, V> I have a deadlock on my application when I use multiple threads. V> I use 3 thread classes, let call them ThreadA, ThreadB, ThreadC. V> ThreadA opens a sqlite connection, then creates a ThreadB which opens a V> sqlite connection then creates a ThreadC which also opens a sqlite V> connection (all connections to the same database). The application V> creates serveral concurrent ThreadA threads. V> So this looks like this: ThreadA (open) ->> ThreadB (open) -> ThreadC (open) ThreadA (open) ->> ThreadB (open) -> ThreadC (open) ThreadA (open) ->> ThreadB (open) -> ThreadC (open) ThreadA (open) ->> ThreadB (open) -> ThreadC (open) V> ... V> The deadlock happens on eithre ThreadB or ThreadC at the time when V> sqlite3_open() is called. I don't get a return code, the application V> just freeze somewhere within the open method. V> Now if I run DIRECT concurrent instances of ThreadB (or ThreadC) it V> doesn't happen, so I'm wondering if there is an issue with threads V> creating other threads that open sqlite connections. V> Thanks V> Voxen V> ----------------------------------------------------------------------------- V> To unsubscribe, send email to [EMAIL PROTECTED] V> ----------------------------------------------------------------------------- Seems like you should be using a debugger and determining where in SQlite the freeze is happening. What happens if you use a global mutex/lock to prevent simultaneous calls to "open"? -- Best regards, Teg mailto:[EMAIL PROTECTED] ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------