realbasic-nug
[Top] [All Lists]

Re: what do you actually use threads for?

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: what do you actually use threads for?
From: Joe Strout <joe at inspiringapps dot com>
Date: Wed, 30 Jan 2008 10:48:34 -0700
Delivered-to: listarchive at realsoftware dot com
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <637E97CC-27B0-4CC6-8526-F84F30923F1C at sentman dot com>
On Jan 30, 2008, at 10:27 AM, James Sentman wrote:

> If I need to do long calculations I use a timer with a tiny period
> set. Then I find a reasonable amount of time to freeze up the main
> thread and save off the start ticks and compare in my loop and when
> I've used say, a quarter of a second I bow out and let the main look
> process again until the timer is called again and I pick up where I
> left off.
>
> Many such things as that.

Yow.  Those are the things you should consider using threads for;  
they're much easier than what you're currently doing (and probably  
provide a better user experience, too).

> But anything else you can do broken up in the main thread with
> similar or better performance than in a thread. Or at least you used
> to be able to.

Sure, you can implement your own crude threading model, but it's a  
lot harder and in most cases is not likely to be better than using  
the built-in one.

>

Best,
- Joe

--
Joe Strout
Inspiring Applications, Inc.
http://www.InspiringApps.com



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

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>