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.
OS level preemptive threads are managed by the OS. Code in them does not need to yield, the yield will occur regardless of what the code is doing. PreemptiveThreadTD is based on OS APIs. The issue isn't whether or not calling SQLite from PreemptiveThreadTD will lock up (it will not), but will it crash. If the SQLite code or plugin does something "illegal" for a preemptive thread, it will crash. But database access is, in my experience, a fairly safe area. Most of the illegal stuff with preemption has to do with touching the user interface, either directly or through a class or API that touches the UI. Another issue is that if SQLite can only handle one request at a time, then you're still limited to making a single request at a time, though at least you can do other things, i.e. your application won't freeze. I'll play with it myself tonight. I've done this successfully with PreemptiveThreadTD and MySQL before, including making many queries at once. While I've used PreemptiveThreadTD in applications for clients, neither of the two applications on my web site use it, though TextSpresso will eventually. I do know one RB user that is using it in a commercial app, but I don't want to say without his permission. Make sure you try 2.0. 1.0 had some issues that would lead to crashes. Daniel L. Taylor Taylor Design Computer Consulting & Software Development [EMAIL PROTECTED] www.taylor-design.com _______________________________________________ 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>
