Xojo Conferences
XDCMay2019MiamiUSA

RE: Multi-tasking/Multi-threading (was How do I handle a "PleaseWait"window?) (Real Studio network user group Mailinglist archive)

Back to the thread list
Previous thread: Re: macoslib additions
Next thread: [WE] Long response page?


[WE] How do I handle a "Please Wait" window?   -   Greg Olson-Hyde
  RE: Multi-tasking/Multi-threading (was How do I handle a "PleaseWait"window?)   -   Hodges, Robert CTR USAF AFMC 520 SMXS/MXDEC
    Re: Multi-tasking/Multi-threading (was How do I handle a "Please Wait" window?)   -   Norman Palardy
    Re: Multi-tasking/Multi-threading (was How do I handle a "PleaseWait" window?)   -   Stéphane Mons <
    Re: Multi-tasking/Multi-threading (was How do I handle a "PleaseWait" window?)   -   Charles Yeomans
    Re: Multi-tasking/Multi-threading (was How do I handle a "PleaseWait" window?)   -   Stéphane Mons <
    RE: Multi-tasking/Multi-threading (was How do I handle a "PleaseWait" window?)   -   Hodges, Robert CTR USAF AFMC 520 SMXS/MXDEC
    Re: Multi-tasking/Multi-threading (was How do I handle a "Please Wait" window?)   -   Stéphane Mons <
    RE: Multi-tasking/Multi-threading (was How do I handle a "Please Wait" window?)   -   Hodges, Robert CTR USAF AFMC 520 SMXS/MXDEC

RE: Multi-tasking/Multi-threading (was How do I handle a "PleaseWait"window?)
Date: 03.08.11 21:40 (Wed, 3 Aug 2011 14:40:27 -0600)
From: Hodges, Robert CTR USAF AFMC 520 SMXS/MXDEC
Yeah, same with Timers, I had to do the same thing. But I was quite used to it. So if not much has changed, I'll be right at home. :-)


-----Original Message-----
From: <email address removed> [mailto:<email address removed>] On Behalf Of Stéphane Mons
Sent: Wednesday, August 03, 2011 1:35 PM
To: Realbasic NUG
Subject: Re: Multi-tasking/Multi-threading (was How do I handle a "PleaseWait"window?)

Using Threads is a lot of work too, mainly because you cannot access the UI from within a Thread. It means that you usually need to have Timers to read the progress of each thread and modify the UI accordingly.

Le 3 août 2011 à 21:27, Hodges, Robert CTR USAF AFMC 520 SMXS/MXDEC a écrit :

> I did read up on the threads, and did see the priority features. Just wondering how effective they are to DoEvents. I know it was more work to use Timers and DoEvents in the past (I have a feeling that today's "Threads" are yesterday's Timer/Doevents combo, just more conveniently packaged).
>
> Thanks for the great reply, good information. :-)
>
> Bob
>
>
> -----Original Message-----
> From: <email address removed> [mailto:<email address removed>] On Behalf Of Stéphane Mons
> Sent: Wednesday, August 03, 2011 12:27 PM
> To: Realbasic NUG
> Subject: Re: Multi-tasking/Multi-threading (was How do I handle a "PleaseWait" window?)
>
>
> Le 3 août 2011 à 20:14, Hodges, Robert CTR USAF AFMC 520 SMXS/MXDEC a écrit :
>
>> That's very interesting to me. DoEvents was the magic pill that cured
>> all ills in terms of running multiple processes. I have always sworn by
>> it, and used it extensively.
>>
>> I know using threads is the "proper way" now, even in other development
>> products, and I agree, provided the threads play nice.
>>
>> Hopefully these questions aren't TOO dumb:
>>
>> 1. Do threads in RS automatically release timeslices for cooperative
>> multitasking so things run smoothly?
>
> Yes, RS manages the time slices for each thread for you. You can even change the priority for each thread, pause/resume them.
>
>
>> 2. Or is there something similar to DoEvents so the programmer has
>> direct control over the performance of each thread?
>
> App.YieldToNextThread does it
>
>
>> Sorry for the newb questions, I just haven't played around with RS long
>> enough to really know yet, and this topic caught my eye. I just need to
>> know about this because of how extensively I have relied on it in the
>> past.
>>
>> I'll change the subject to more accurately reflect the content.
>>
>> Thanks,
>>
>> Bob
>>
>>
>>
>>
>> -----Original Message-----
>> From: <email address removed>
>> [mailto:<email address removed>] On Behalf Of
>> Norman Palardy
>> Sent: Wednesday, August 03, 2011 11:43 AM
>> To: Realbasic NUG
>> Subject: Re: [WE] How do I handle a "Please Wait" window?
>> [Multi-threadinginWE]
>>
>>
>> On Aug 3, 2011, at 11:11 AM, Hodges, Robert CTR USAF AFMC 520 SMXS/
>> MXDEC wrote:
>>
>>> Serious problems, huh?
>>
>>
>> While it sounds a lot like the VB version the runtimes etc are
>> different enough that you should avoid using it in a desktop app
>>
>> Norman Palardy
>>
>> Real World 2012, THE Real Studio Event of the year!
>> http://realsoftware.com/community/realworld.php
>>
>>
>> _______________________________________________
>> Unsubscribe or switch delivery mode:
>> <http://www.realsoftware.com/support/listmanager/>
>>
>> Search the archives:
>> <http://support.realsoftware.com/listarchives/lists.html>
>>
>> _______________________________________________
>> Unsubscribe or switch delivery mode:
>> <http://www.realsoftware.com/support/listmanager/>
>>
>> Search the archives:
>> <http://support.realsoftware.com/listarchives/lists.html>
>
> 5 REM My Signature
> 10 PRINT "Stéphane"
> 20 GOTO 10
>
>
>
>
> _______________________________________________
> Unsubscribe or switch delivery mode:
> <http://www.realsoftware.com/support/listmanager/>
>
> Search the archives:
> <http://support.realsoftware.com/listarchives/lists.html>
>
> _______________________________________________
> Unsubscribe or switch delivery mode:
> <http://www.realsoftware.com/support/listmanager/>
>
> Search the archives:
> <http://support.realsoftware.com/listarchives/lists.html>

5 REM My Signature
10 PRINT "Stéphane"
20 GOTO 10



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

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

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

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

Re: Multi-tasking/Multi-threading (was How do I handle a "Please Wait" window?)
Date: 03.08.11 21:25 (Wed, 3 Aug 2011 14:25:15 -0600)
From: Norman Palardy
On Aug 3, 2011, at 12:14 PM, Hodges, Robert CTR USAF AFMC 520 SMXS/
MXDEC wrote:

> That's very interesting to me. DoEvents was the magic pill that cured
> all ills in terms of running multiple processes. I have always
> sworn by
> it, and used it extensively.

In VB I used it all the time as well. It was nearly required.
But RB/RS is not VB hence the admonition.

> I know using threads is the "proper way" now, even in other
> development
> products, and I agree, provided the threads play nice.
>
> Hopefully these questions aren't TOO dumb:
>
> 1. Do threads in RS automatically release timeslices for cooperative
> multitasking so things run smoothly?

They automatically yield on loop boundaries so

> 2. Or is there something similar to DoEvents so the programmer has
> direct control over the performance of each thread?

Priority

Norman Palardy

Real World 2012, THE Real Studio Event of the year!
http://realsoftware.com/community/realworld.php

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

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

Re: Multi-tasking/Multi-threading (was How do I handle a "PleaseWait" window?)
Date: 03.08.11 20:51 (Wed, 3 Aug 2011 21:51:29 +0200)
From: Stéphane Mons <
Hmm good to know !! Thanks


Le 3 août 2011 à 21:47, Charles Yeomans a écrit :

> Note that it appears to be okay to start a Timer from within a thread; its Action event handler will still be invoked from the main thread. This allows for a more efficient approach than repeated polling.
>
>
> Charles Yeomans
>
>
> On Aug 3, 2011, at 3:35 PM, Stéphane Mons wrote:
>
>> Using Threads is a lot of work too, mainly because you cannot access the UI from within a Thread. It means that you usually need to have Timers to read the progress of each thread and modify the UI accordingly.
>>
>>
>> Le 3 août 2011 à 21:27, Hodges, Robert CTR USAF AFMC 520 SMXS/MXDEC a écrit :
>>
>>> I did read up on the threads, and did see the priority features. Just wondering how effective they are to DoEvents. I know it was more work to use Timers and DoEvents in the past (I have a feeling that today's "Threads" are yesterday's Timer/Doevents combo, just more conveniently packaged).
>>>
>>> Thanks for the great reply, good information. :-)
>>>
>>> Bob
>
>
> _______________________________________________
> Unsubscribe or switch delivery mode:
> <http://www.realsoftware.com/support/listmanager/>
>
> Search the archives:
> <http://support.realsoftware.com/listarchives/lists.html>

5 REM My Signature
10 PRINT "Stéphane"
20 GOTO 10



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

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

Re: Multi-tasking/Multi-threading (was How do I handle a "PleaseWait" window?)
Date: 03.08.11 20:47 (Wed, 3 Aug 2011 15:47:02 -0400)
From: Charles Yeomans
Note that it appears to be okay to start a Timer from within a thread; its Action event handler will still be invoked from the main thread. This allows for a more efficient approach than repeated polling.

Charles Yeomans

On Aug 3, 2011, at 3:35 PM, Stéphane Mons wrote:

> Using Threads is a lot of work too, mainly because you cannot access the UI from within a Thread. It means that you usually need to have Timers to read the progress of each thread and modify the UI accordingly.
>
>
> Le 3 août 2011 à 21:27, Hodges, Robert CTR USAF AFMC 520 SMXS/MXDEC a écrit :
>
>> I did read up on the threads, and did see the priority features. Just wondering how effective they are to DoEvents. I know it was more work to use Timers and DoEvents in the past (I have a feeling that today's "Threads" are yesterday's Timer/Doevents combo, just more conveniently packaged).
>>
>> Thanks for the great reply, good information. :-)
>>
>> Bob

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

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

Re: Multi-tasking/Multi-threading (was How do I handle a "PleaseWait" window?)
Date: 03.08.11 20:35 (Wed, 3 Aug 2011 21:35:05 +0200)
From: Stéphane Mons <
Using Threads is a lot of work too, mainly because you cannot access the UI from within a Thread. It means that you usually need to have Timers to read the progress of each thread and modify the UI accordingly.

Le 3 août 2011 à 21:27, Hodges, Robert CTR USAF AFMC 520 SMXS/MXDEC a écrit :

> I did read up on the threads, and did see the priority features. Just wondering how effective they are to DoEvents. I know it was more work to use Timers and DoEvents in the past (I have a feeling that today's "Threads" are yesterday's Timer/Doevents combo, just more conveniently packaged).
>
> Thanks for the great reply, good information. :-)
>
> Bob
>
>
> -----Original Message-----
> From: <email address removed> [mailto:<email address removed>] On Behalf Of Stéphane Mons
> Sent: Wednesday, August 03, 2011 12:27 PM
> To: Realbasic NUG
> Subject: Re: Multi-tasking/Multi-threading (was How do I handle a "PleaseWait" window?)
>
>
> Le 3 août 2011 à 20:14, Hodges, Robert CTR USAF AFMC 520 SMXS/MXDEC a écrit :
>
>> That's very interesting to me. DoEvents was the magic pill that cured
>> all ills in terms of running multiple processes. I have always sworn by
>> it, and used it extensively.
>>
>> I know using threads is the "proper way" now, even in other development
>> products, and I agree, provided the threads play nice.
>>
>> Hopefully these questions aren't TOO dumb:
>>
>> 1. Do threads in RS automatically release timeslices for cooperative
>> multitasking so things run smoothly?
>
> Yes, RS manages the time slices for each thread for you. You can even change the priority for each thread, pause/resume them.
>
>
>> 2. Or is there something similar to DoEvents so the programmer has
>> direct control over the performance of each thread?
>
> App.YieldToNextThread does it
>
>
>> Sorry for the newb questions, I just haven't played around with RS long
>> enough to really know yet, and this topic caught my eye. I just need to
>> know about this because of how extensively I have relied on it in the
>> past.
>>
>> I'll change the subject to more accurately reflect the content.
>>
>> Thanks,
>>
>> Bob
>>
>>
>>
>>
>> -----Original Message-----
>> From: <email address removed>
>> [mailto:<email address removed>] On Behalf Of
>> Norman Palardy
>> Sent: Wednesday, August 03, 2011 11:43 AM
>> To: Realbasic NUG
>> Subject: Re: [WE] How do I handle a "Please Wait" window?
>> [Multi-threadinginWE]
>>
>>
>> On Aug 3, 2011, at 11:11 AM, Hodges, Robert CTR USAF AFMC 520 SMXS/
>> MXDEC wrote:
>>
>>> Serious problems, huh?
>>
>>
>> While it sounds a lot like the VB version the runtimes etc are
>> different enough that you should avoid using it in a desktop app
>>
>> Norman Palardy
>>
>> Real World 2012, THE Real Studio Event of the year!
>> http://realsoftware.com/community/realworld.php
>>
>>
>> _______________________________________________
>> Unsubscribe or switch delivery mode:
>> <http://www.realsoftware.com/support/listmanager/>
>>
>> Search the archives:
>> <http://support.realsoftware.com/listarchives/lists.html>
>>
>> _______________________________________________
>> Unsubscribe or switch delivery mode:
>> <http://www.realsoftware.com/support/listmanager/>
>>
>> Search the archives:
>> <http://support.realsoftware.com/listarchives/lists.html>
>
> 5 REM My Signature
> 10 PRINT "Stéphane"
> 20 GOTO 10
>
>
>
>
> _______________________________________________
> Unsubscribe or switch delivery mode:
> <http://www.realsoftware.com/support/listmanager/>
>
> Search the archives:
> <http://support.realsoftware.com/listarchives/lists.html>
>
> _______________________________________________
> Unsubscribe or switch delivery mode:
> <http://www.realsoftware.com/support/listmanager/>
>
> Search the archives:
> <http://support.realsoftware.com/listarchives/lists.html>

5 REM My Signature
10 PRINT "Stéphane"
20 GOTO 10



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

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

RE: Multi-tasking/Multi-threading (was How do I handle a "PleaseWait" window?)
Date: 03.08.11 20:27 (Wed, 3 Aug 2011 13:27:30 -0600)
From: Hodges, Robert CTR USAF AFMC 520 SMXS/MXDEC
I did read up on the threads, and did see the priority features. Just wondering how effective they are to DoEvents. I know it was more work to use Timers and DoEvents in the past (I have a feeling that today's "Threads" are yesterday's Timer/Doevents combo, just more conveniently packaged).

Thanks for the great reply, good information. :-)

Bob

-----Original Message-----
From: <email address removed> [mailto:<email address removed>] On Behalf Of Stéphane Mons
Sent: Wednesday, August 03, 2011 12:27 PM
To: Realbasic NUG
Subject: Re: Multi-tasking/Multi-threading (was How do I handle a "PleaseWait" window?)

Le 3 août 2011 à 20:14, Hodges, Robert CTR USAF AFMC 520 SMXS/MXDEC a écrit :

> That's very interesting to me. DoEvents was the magic pill that cured
> all ills in terms of running multiple processes. I have always sworn by
> it, and used it extensively.
>
> I know using threads is the "proper way" now, even in other development
> products, and I agree, provided the threads play nice.
>
> Hopefully these questions aren't TOO dumb:
>
> 1. Do threads in RS automatically release timeslices for cooperative
> multitasking so things run smoothly?

Yes, RS manages the time slices for each thread for you. You can even change the priority for each thread, pause/resume them.

> 2. Or is there something similar to DoEvents so the programmer has
> direct control over the performance of each thread?

App.YieldToNextThread does it

> Sorry for the newb questions, I just haven't played around with RS long
> enough to really know yet, and this topic caught my eye. I just need to
> know about this because of how extensively I have relied on it in the
> past.
>
> I'll change the subject to more accurately reflect the content.
>
> Thanks,
>
> Bob
>
>
>
>
> -----Original Message-----
> From: <email address removed>
> [mailto:<email address removed>] On Behalf Of
> Norman Palardy
> Sent: Wednesday, August 03, 2011 11:43 AM
> To: Realbasic NUG
> Subject: Re: [WE] How do I handle a "Please Wait" window?
> [Multi-threadinginWE]
>
>
> On Aug 3, 2011, at 11:11 AM, Hodges, Robert CTR USAF AFMC 520 SMXS/
> MXDEC wrote:
>
>> Serious problems, huh?
>
>
> While it sounds a lot like the VB version the runtimes etc are
> different enough that you should avoid using it in a desktop app
>
> Norman Palardy
>
> Real World 2012, THE Real Studio Event of the year!
> http://realsoftware.com/community/realworld.php
>
>
> _______________________________________________
> Unsubscribe or switch delivery mode:
> <http://www.realsoftware.com/support/listmanager/>
>
> Search the archives:
> <http://support.realsoftware.com/listarchives/lists.html>
>
> _______________________________________________
> Unsubscribe or switch delivery mode:
> <http://www.realsoftware.com/support/listmanager/>
>
> Search the archives:
> <http://support.realsoftware.com/listarchives/lists.html>

5 REM My Signature
10 PRINT "Stéphane"
20 GOTO 10



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

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

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

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

Re: Multi-tasking/Multi-threading (was How do I handle a "Please Wait" window?)
Date: 03.08.11 19:27 (Wed, 3 Aug 2011 20:27:04 +0200)
From: Stéphane Mons <

Le 3 août 2011 à 20:14, Hodges, Robert CTR USAF AFMC 520 SMXS/MXDEC a écrit :

> That's very interesting to me. DoEvents was the magic pill that cured
> all ills in terms of running multiple processes. I have always sworn by
> it, and used it extensively.
>
> I know using threads is the "proper way" now, even in other development
> products, and I agree, provided the threads play nice.
>
> Hopefully these questions aren't TOO dumb:
>
> 1. Do threads in RS automatically release timeslices for cooperative
> multitasking so things run smoothly?

Yes, RS manages the time slices for each thread for you. You can even change the priority for each thread, pause/resume them.

> 2. Or is there something similar to DoEvents so the programmer has
> direct control over the performance of each thread?

App.YieldToNextThread does it

> Sorry for the newb questions, I just haven't played around with RS long
> enough to really know yet, and this topic caught my eye. I just need to
> know about this because of how extensively I have relied on it in the
> past.
>
> I'll change the subject to more accurately reflect the content.
>
> Thanks,
>
> Bob
>
>
>
>
> -----Original Message-----
> From: <email address removed>
> [mailto:<email address removed>] On Behalf Of
> Norman Palardy
> Sent: Wednesday, August 03, 2011 11:43 AM
> To: Realbasic NUG
> Subject: Re: [WE] How do I handle a "Please Wait" window?
> [Multi-threadinginWE]
>
>
> On Aug 3, 2011, at 11:11 AM, Hodges, Robert CTR USAF AFMC 520 SMXS/
> MXDEC wrote:
>
>> Serious problems, huh?
>
>
> While it sounds a lot like the VB version the runtimes etc are
> different enough that you should avoid using it in a desktop app
>
> Norman Palardy
>
> Real World 2012, THE Real Studio Event of the year!
> http://realsoftware.com/community/realworld.php
>
>
> _______________________________________________
> Unsubscribe or switch delivery mode:
> <http://www.realsoftware.com/support/listmanager/>
>
> Search the archives:
> <http://support.realsoftware.com/listarchives/lists.html>
>
> _______________________________________________
> Unsubscribe or switch delivery mode:
> <http://www.realsoftware.com/support/listmanager/>
>
> Search the archives:
> <http://support.realsoftware.com/listarchives/lists.html>

5 REM My Signature
10 PRINT "Stéphane"
20 GOTO 10



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

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

RE: Multi-tasking/Multi-threading (was How do I handle a "Please Wait" window?)
Date: 03.08.11 19:14 (Wed, 3 Aug 2011 12:14:27 -0600)
From: Hodges, Robert CTR USAF AFMC 520 SMXS/MXDEC
That's very interesting to me. DoEvents was the magic pill that cured
all ills in terms of running multiple processes. I have always sworn by
it, and used it extensively.

I know using threads is the "proper way" now, even in other development
products, and I agree, provided the threads play nice.

Hopefully these questions aren't TOO dumb:

1. Do threads in RS automatically release timeslices for cooperative
multitasking so things run smoothly?

2. Or is there something similar to DoEvents so the programmer has
direct control over the performance of each thread?

Sorry for the newb questions, I just haven't played around with RS long
enough to really know yet, and this topic caught my eye. I just need to
know about this because of how extensively I have relied on it in the
past.

I'll change the subject to more accurately reflect the content.

Thanks,

Bob



-----Original Message-----
From: <email address removed>
[mailto:<email address removed>] On Behalf Of
Norman Palardy
Sent: Wednesday, August 03, 2011 11:43 AM
To: Realbasic NUG
Subject: Re: [WE] How do I handle a "Please Wait" window?
[Multi-threadinginWE]

On Aug 3, 2011, at 11:11 AM, Hodges, Robert CTR USAF AFMC 520 SMXS/
MXDEC wrote:

> Serious problems, huh?

While it sounds a lot like the VB version the runtimes etc are
different enough that you should avoid using it in a desktop app

Norman Palardy

Real World 2012, THE Real Studio Event of the year!
http://realsoftware.com/community/realworld.php

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

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

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

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