• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: AppleScript's ThreadednessŠ
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Prev by Date: Re: AppleScript's Threadedness…
  • Next by Date: Re: AppleScript's Threadedness…
  • Previous by thread: Re: iTunes - Wait for a Duplicate Operation to Complete??
  • Next by thread: Re: AppleScript's Threadedness…
  • Index(es):
    • Date
    • Thread