Re: Multi-threaded - thanks
Re: Multi-threaded - thanks
- Subject: Re: Multi-threaded - thanks
- From: Christopher Nebel <email@hidden>
- Date: Fri, 7 Nov 2003 14:22:55 -0800
On Nov 7, 2003, at 7:59 AM, Bill Briggs wrote:
I think what you're seeing is the (documented) change from LIFO to
FIFO processing. Nice, but not really multi-threading.
I haven't read the release notes - yet - but from an OS perspective as
far as I understand it, the difference between LIFO and FIFO is
precisely the difference between non-preemptive thread scheduling and
preemptive thread scheduling. In the case of FIFO you are able to run
simultaneous threads. LIFO blocks pending thread execution because it
can't pre-empt the running thread, effectively rendering it a single
thread system.
Sorry, but you're confusing two completely unrelated concepts.
Preemptive vs. non-preemptive (aka "cooperative") scheduling is simply
a matter of how you decide which threads get time when. LIFO vs. FIFO
have to do with what order you handle requests coming into a queue.
(Essentially, requests come into one end; which end do you draw from?)
Realize that "threading" implies pseudo-simultaneous execution of
multiple tasks, and applets still don't do this.
Before you couldn't even click in a second Script Editor window to run
a script. The system just beeped at you. Now you can actually run a
second thread at the same time as the first.
I had thought you were referring to applets, but this bit means you're
actually talking about Script Editor. Yes, Script Editor 2.0 will run
multiple scripts at once. It can do this because AppleScript has (and
has always had) sufficient infrastructure to do cooperative threading.
Of course, trying to thread two executions of the same script may or
may not work well, since AppleScript lacks any concept of
synchronization or critical sections.
--Chris Nebel
AppleScript Engineering
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.