Re: AppleScript's Threadedness
Re: AppleScript's Threadedness
- Subject: Re: AppleScript's Threadedness
- From: julifos <email@hidden>
- Date: Wed, 19 Nov 2008 22:11:04 +0100
- Thread-topic: AppleScript's Threadedness
> I've got a main AppleScript script which can be called by any number
> of scripts - potentially simultaneously. In the main AppleScript I
> plan to have a lightweight run handler which will add the incoming
> request to a queue while other bits of the script may be tied up
> elsewhere. Will this work or is AppleScript strictly a one-task-at-a-
> time affair?
As far as I know, AppleScript itself is one-task-at-a-time. But that doesn't
mean you can't use "tricks" to simulate a multithread process (if possible
and depending on your needs).
For example, you can create multiple instances of that main script you
mention (if you create them from different scripts/processes). If you are
duplicating a file using the Finder, you can use a "ignoring responses"
clause. The same for "do shell script".
And you can as well create queues, for example writing your tasks to an
external text file.
But AS is single-thread. If it's busy doing something, it won't answer your
questions.
jj
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden