• 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: Best Strategy to Control iTunes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Best Strategy to Control iTunes


  • Subject: Re: Best Strategy to Control iTunes
  • From: Bill Bumgarner <email@hidden>
  • Date: Wed, 01 Apr 2009 14:07:38 -0700

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 (email@hidden)

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:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Best Strategy to Control iTunes
      • From: Ammar Ibrahim <email@hidden>
References: 
 >Re: Best Strategy to Control iTunes (From: "Luca C." <email@hidden>)
 >Re: Best Strategy to Control iTunes (From: Ammar Ibrahim <email@hidden>)
 >Re: Best Strategy to Control iTunes (From: "Luca C." <email@hidden>)

  • Prev by Date: Re: XMLParser
  • Next by Date: Re: NS <-> CG Rect Conversion and screen coordinates
  • Previous by thread: Re: Best Strategy to Control iTunes
  • Next by thread: Re: Best Strategy to Control iTunes
  • Index(es):
    • Date
    • Thread