On Jun 23, 2006, at 12:50 PM, Marcel wrote:

As far as I know, this isn't possible (and of course I tried it), because the RB SQLite interface isn't thread safe and locks up the main thread until the query is done - independent from where you place it or where you open the Db connection.

But I am still searching for a solution, because my program is behaving like a sack full of buff-spotted woodpeckers because of this.

Best,
Marcel

Well ... no ... that's not the reason

The SQLite plugin is just that, a plugin. But in early versions it was not set up to yield to other threads when it could and so it would make other threads wait while it did its thing. Later versions have been updated so that this sort of locking up is diminished

But most SQL databases do not have a way to run a query asynchronously.
So regardless of how you do things running the query makes everything else grind to a halt because the call to the DB to run the query is synchronous. Even if you put it in a thread you don't get any yielding to other threads when the query is run because it's totally synchronous and has no way to yield.

I know this was being looked in to for the REAL SQL Database, which is based on SQLIte.



_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to