Good ideas! thank you Mr Hipp!

> Richard Hipp <mailto:drh at sqlite.org>
> mardi 9 f?vrier 2016 13:00
>
> The interface that governs the timeout is "sqlite3_busy_handler()".
> Perhaps you can modify its callback to yield to another thread, rather
> than simply sleeping. Or just set the timeout value to zero and deal
> with retries manually in your application.
>
> olivier vidal <mailto:vidal.olivier at mac.com>
> mardi 9 f?vrier 2016 09:41
>
> Hello,
>
> I use SQLITE with Xojo (formerly Realbasic), a kind of VB 
> multiplatform. Xojo embeds a SQLITE 3.9.2 database.
> It works well. But I have a concern, and I do not know if it is a Xojo 
> problem, or a SQLITE problem.
>
> I am creating an application with Xojo/Sqlite.
>
> This application launches multiple threads (*cooperative threads*, 
> non-preemptive, therefore all threads belong to a single process).
> Each of these threads opens a connection to the SQLITE database (WAL 
> mode).
>
> If multiple threads try to read simultaneously in the database, no 
> problem, it works well.
>
> If multiple threads read and only one thread writes, no problem, it 
> works well (WAL mode).
>
> But I have a problem in this case:
>
> - One thread writes
> - While this thread wrote, another thread requests to write. Of 
> course, a "busy" error is generated, this is normal. But until the 
> error is generated, all threads in the application are frozen during 
> the sqlite timeout!
>
> I tried using "sqlite3_progress_handler" with multiple values. But it 
> doesn't change anything. I also tried using the Xojo features which 
> allow to leave time to other threads, but same problem.
> If Sqlite is busy, all threads in the application will be blocked for 
> the duration of the timeout.
> What do you think?
>
> Thank you
> olivier
> _______________________________________________
> sqlite-users mailing list
> sqlite-users at mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
> olivier vidal <mailto:paxdo at mac.com>
> mardi 9 f?vrier 2016 09:39
>
> Hello,
>
> I use SQLITE with Xojo (formerly Realbasic), a kind of VB 
> multiplatform. Xojo embeds a SQLITE 3.9.2 database.
> It works well. But I have a concern, and I do not know if it is a Xojo 
> problem, or a SQLITE problem.
>
> I am creating an application with Xojo/Sqlite.
>
> This application launches multiple threads (*cooperative threads*, 
> non-preemptive, therefore all threads belong to a single process).
> Each of these threads opens a connection to the SQLITE database (WAL 
> mode).
>
> If multiple threads try to read simultaneously in the database, no 
> problem, it works well.
>
> If multiple threads read and only one thread writes, no problem, it 
> works well (WAL mode).
>
> But I have a problem in this case:
>
> - One thread writes
> - While this thread wrote, another thread requests to write. Of 
> course, a "busy" error is generated, this is normal. But until the 
> error is generated, all threads in the application are frozen during 
> the sqlite timeout!
>
> I tried using "sqlite3_progress_handler" with multiple values. But it 
> doesn't change anything. I also tried using the Xojo features which 
> allow to leave time to other threads, but same problem.
> If Sqlite is busy, all threads in the application will be blocked for 
> the duration of the timeout.
> What do you think?
>
> Thank you
> olivier

Reply via email to