« Future support for Po… | Home | MBS REALbasic Plugins… »

Keeping the GUI running

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:
22 08 10 - 15:04
No comments

Remember personal info?

Emoticons / Textile

Hide email:

Small print: All html tags except <b> and <i> will be removed from your comment. You can make links by just typing the url or mail-address.