On Apr 1, 2009, at 2:04 PM, ammar.ibrahim wrote:
Right now, I'm more confused than I was, hehe. My question is: Why would I care about thread safety? Assuming that everytime I communicate with iTunes I create a thread and have the communication happen from there, even if it's
blocking and times out, it wouldn't affect my main application. I'm I
missing anything here? How would be the command line application any
different from this?


Simply because you isolate your use of the AppleScript API to a thread does not make the API safe to use from that thread. You have no control over what other bits of framework infrastructure might tickle the thread-unsafe parts of the target API while updating the UI or responding to user events.

By isolating the code to a subprocess -- a command line application -- it can be both single threaded and isolated from your application's threads.

b.bum
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to