Home » U++ Library support » U++ SQL » sqlite busy/lock timeout patch
sqlite busy/lock timeout patch [message #25936] |
Sat, 20 March 2010 22:34 |
zsolt
Messages: 698 Registered: December 2005 Location: Budapest, Hungary
|
Contributor |
|
|
I had a lot of problems with sqlite in a multi threaded and multi process environment.
It is possible to set a busy handler on a db handle using sqlite3 API, but it is able to handle SQLITE_BUSY only. The problem is, that sometimes I got SQLITE_LOCKED, but in this case, I had to reset the statement be able to successfully retry.
So I modified U++ sqlite classes, to handle a timeout.
You can set negative value as timeout if you need infinite wait. Infinite is dangerous for more than one thread, as you can get infinite deadlock that way.
I don't know if this workaround fits into U++, but I attached the patch.
|
|
|
|
|
|
|
|
|
Goto Forum:
Current Time: Thu Sep 26 05:27:11 CEST 2024
Total time taken to generate the page: 0.02974 seconds
|