I have asked this before.
Geoff Canyon
gcanyon at inspiredlogic.com
Sat Sep 3 14:42:00 EDT 2005
On Sep 2, 2005, at 7:40 AM, N wrote:
> At this point I click a button invoking ThinOne then the button
> invoking ThingTwo. Only 1 of the functions seem to be running
> why? Does wait with messages not allow currently executing
> handlers to continue until the currently handler exits?
>
> Shouldn't this alternate? If not how do you make them alternate? I
> am aware of "send in time" but that is not the manner in which the
> specific problem should be solved.
wait 0 seconds with messages
This only allows for messages to be processed. So when you click a
button to start ThingTwo, ThingTwo will start the next time ThingOne
does the wait command. But then ThingTwo has control. It will run
until it exits, at which point ThingOne regains control and continues
processing.
There may be a clever trick I don't know about, but I think your
options are to figure out a way to get the job done in one routine,
or switch to send...in. Or build your own thread implementation.
Bear in mind, Threads Are A Bad Idea (for most purposes):
http://home.pacbell.net/ouster/threads.pdf
HTML-only version: http://www.softpanorama.org/People/Ousterhout/
Threads/index.shtml
More information about the use-livecode
mailing list