Re: Simultaneous Events
Re: Simultaneous Events
- Subject: Re: Simultaneous Events
- From: David Blache <email@hidden>
- Date: Thu, 19 Apr 2001 07:45:48 -0500
on 4/19/01 4:33 AM, Simon Forster (email@hidden) wrote:
>
For my part, I wrote an AppleScript CGI which would "email this web page to
>
a friend". It worked fine except, if the CGI was handling a request,
>
subsequent requests seemed to be ignored until the current task had been
>
completed. How to work around this?
Here is a high-level explanation of how I would tackle the problem:
Accomplish your tasks in steps. Do one step at a time, then return to your
idle loop so that you can grab another event if one comes through. You'll
need to set up an array/queue to keep track of the tasks, and perform one
step of each task in queue each time through the idle loop.
Questions?
-David