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: Dave Shirk <dave at pamlicosounds dot com>
Date: Thu, 31 Jan 2008 13:41:21 -0500
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> <1C0C919D-059E-42E8-B883-BCEC24410BDD at inspiringapps dot com> <0BC45110-6A27-45FE-9754-5E79332E386C at sentman dot com> <085E440B-EA0B-4A04-818E-541F5F8FBF1B at pamlicosounds dot com> <F0C5CD13-7FEC-47A6-9711-6B5A03F26265 at sentman dot com>
On Jan 31, 2008, at 7:47 AM, James Sentman wrote:

> Hi Dave The Threads Guy ;)
>
> But all networking events about new data still happen in the main
> thread right? And you have to hand that off to your thread for
> processing once you've read it? That is how you used to have to do it.
> But as you've noticed I am not up to speed on all the changes during
> my RB dark period ;) I never stopped using it, but we had children and
> the time I had to experiment with new things kind of disappeared...
>
> Thanks,
>  James

James,

My app is fairly complex.  As an example, the main window is basically  
controlling
a Ham radio. It needs to stay very responsive to users input as well  
as data from the radio.
While this is happening, I am receiving data via telnet, which may  
need acting on.
So the telnet data is checked every second via a timer which starts a  
thread to massage the data. From this data, as well as user entered  
data, I need to fetch other info from the web via HTTP.Get.  There are  
two basic different sets of data.  These are both performed in  
threads.  The delays in the data retrieval when implemented via  
threads is the same as if done 'un-thraded', however, my main window  
interface remains very responsive at all times. Before the threads,  
the main window would basically stop while these other operations were  
performed.  So it works quite well, in my rather convoluted app ;-)

Dave

_______________________________________________
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>