RbScript in a thread... (Real Studio network user group Mailinglist archive)

Back to the thread list
Previous thread: How do you deal with number ranges in EditFields?
Next thread: Apple Help


Re: [1/2 OFF] Only MacOS X   -   Jan Erik Moström <
  RbScript in a thread...   -   Ryan Dary
   Re: RbScript in a thread...   -   Joseph J. Strout
    Re: RbScript in a thread...   -   Noah Desch
    Re: RbScript in a thread...   -   Ryan Dary
     Re: RbScript in a thread...   -   Brady Duga
   Re: RbScript in a thread...   -   Mars Saxman

RbScript in a thread...
Date: 28.09.02 21:13 (Sat, 28 Sep 2002 13:13:59 -0700)
From: Ryan Dary
Hello. I am trying to run an RbScript from a thread. I am noticing some
problems with having two run at the same time.

Is it not safe to use RbScript instances from a thread, or expect two
RbScripts to be running at the same time?

Or, perhaps it is fine, I am just doing it wrong? Any ideas?

All I am doing is subclassing a thread, and an RbScript class, and trying
to run several scripts at once.


Thanks,

Ryan Dary
=#D#D#D#D#D#D#Dwww.ryandary.com
=oDwDcDgDcDoD#D

---
A searchable archive of this list is available at:
<http://dbserver.realsoftware.com/KBDB/search.php>

Unsubscribe:
<mailto:<email address removed>>

Subscribe to the digest:
<mailto:<email address removed>>

Re: RbScript in a thread...
Date: 28.09.02 21:17 (Sat, 28 Sep 2002 13:17:19 -0700)
From: Joseph J. Strout
At 1:13 PM -0700 9/28/02, Ryan Dary wrote:

>Is it not safe to use RbScript instances from a thread, or expect two
>RbScripts to be running at the same time?

No, that should be fine.

Of course an alternative is to service the scripts in round-robin
fashion yourself, using PartialRun.

Cheers,
- Joe

Re: RbScript in a thread...
Date: 28.09.02 21:43 (Sat, 28 Sep 2002 16:43:06 -0400)
From: Noah Desch

On Saturday, September 28, 2002, at 04:17 PM, Joseph J. Strout wrote:

> At 1:13 PM -0700 9/28/02, Ryan Dary wrote:
>
>> Is it not safe to use RbScript instances from a thread, or expect two
>> RbScripts to be running at the same time?

> Of course an alternative is to service the scripts in round-robin fashion
> yourself, using PartialRun.

I thought you *had* to do it that way inside the thread, because RBScript.
Run() would never yield until the script finished.

-Noah Desch
Wireframe Software
http://wireframe.virtualave.net

"The noozle! The noozle on the hoose!"
-Groundskeeper Willie

---
A searchable archive of this list is available at:
<http://dbserver.realsoftware.com/KBDB/search.php>

Unsubscribe:
<mailto:<email address removed>>

Subscribe to the digest:
<mailto:<email address removed>>

Re: RbScript in a thread...
Date: 30.09.02 22:05 (Mon, 30 Sep 2002 14:05:50 -0700)
From: Ryan Dary
Interesting, so there must be something that I am doing wrong. Here is
what I am doing:

I have a thread subclass which has the folling code:

Do
mExecutor.PartialRun 1000
Loop until mExecutor.State <> 1
mExecutor.release
mExecutor = nil

Complete = True

mExecutor is an instance of a RbScript subclass. It simply is used to be
able to do something with the events in the RbScript.

The mExecutor is given some source in another method, and then passed to
a new thread where the above code is executed.

I tested it using the .Source property below:

dim i as Integer

for i = 0 to 100
print "Hello World " + Str(i) + Chr(13)
next

In the mExecutor above, when the print method is used, it throws the text
into a globally accessible edit field.

When I compile and run, it appears to do nothing. Any ideas?

Thanks,

Ryan Dary
=oDsD{DcDgDwDgDwww.ryandary.com
=gDgD#DoDsDcDgD
Sat, 28 Sep 2002 13:17:19 -0700

>>Is it not safe to use RbScript instances from a thread, or expect two
>>RbScripts to be running at the same time?
>
>No, that should be fine.
>
>Of course an alternative is to service the scripts in round-robin
>fashion yourself, using PartialRun.
>
>Cheers,
>- Joe
>
>--
>,------------------------------------------------------------------.
>| Joseph J. Strout REAL Software, Inc. |
>| <email address removed> http://www.realsoftware.com |
>`------------------------------------------------------------------'


---
A searchable archive of this list is available at:
<http://dbserver.realsoftware.com/KBDB/search.php>

Unsubscribe:
<mailto:<email address removed>>

Subscribe to the digest:
<mailto:<email address removed>>

Re: RbScript in a thread...
Date: 30.09.02 22:22 (Mon, 30 Sep 2002 14:22:17 -0700)
From: Brady Duga

On Monday, September 30, 2002, at 02:05 PM, Ryan Dary wrote:

> Interesting, so there must be something that I am doing wrong. Here is
> what I am doing:

Perhaps not - I tried PartialRun recently and never got it to work,
even though the script ran fine with just a "run". Perhaps some more
research and a WEBbug is in order...

--Brady
The La Jolla Underground

---
A searchable archive of this list is available at:
<http://dbserver.realsoftware.com/KBDB/search.php>

Unsubscribe:
<mailto:<email address removed>>

Subscribe to the digest:
<mailto:<email address removed>>

Re: RbScript in a thread...
Date: 28.09.02 21:56 (Sat, 28 Sep 2002 13:56:14 -0700)
From: Mars Saxman
<email address removed> wrote:

> Hello. I am trying to run an RbScript from a thread. I am noticing some
> problems with having two run at the same time.

What do you mean by "some problems"? Which version of RB are you using?

Mars Saxman
REAL Software

---
A searchable archive of this list is available at:
<http://dbserver.realsoftware.com/KBDB/search.php>

Unsubscribe:
<mailto:<email address removed>>

Subscribe to the digest:
<mailto:<email address removed>>