« Future support for Po… |
Home |
MBS REALbasic Plugins… »
Today I worked on threading. And it is possible to move some long process on a thread, I mean a process which does not yield time to other threads. Let's say you have a SQL query on a database. This query may take 30 seconds and in this time, your GUI is not responsible. Typically you would now run this query on a thread. But wait, the SQL code has no idea about yielding time to the REAL Studio runtime. But we can now put that code into an extra preemptive thread. This way our function can yield time.
So once we have a SQLExecuteMT function, you can call it in a thread. The actual work will run on a helper thread in background, so the thread you have, can wait and yield time. This keeps your GUI running and the query runs in background just fine.
If you have suggestions for what methods we should improve responsibilities, please comment here or email us.
Used tags: news
22 08 10 - 15:04