• 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: question for sending multiple requests to iTunes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: question for sending multiple requests to iTunes


  • Subject: RE: question for sending multiple requests to iTunes
  • From: "Philip Lukidis" <email@hidden>
  • Date: Mon, 4 Sep 2006 13:00:22 -0400
  • Thread-topic: question for sending multiple requests to iTunes

Title: RE: question for sending multiple requests to iTunes

Hello, thanks for your reply.  I'm away from work for now, but I had also sent the request to the cocoa list, where someone was kind enouhg to reveal my error.  I'm quite embarassed to admit that I missed the admonition in Apple's documentation to not use NSAppleScript objects in any thread but the main thread.  That is something which I have quite clearly violated.  When I get back to work tomorrow I shall test it out.

Your finding is interesting also, and I will read it as well.

thank you,

Philip Lukidis

-----Original Message-----
From: Le Stang Jean-Baptiste [mailto:email@hidden]
Sent: Sat 9/2/2006 4:05 AM
To: Philip Lukidis; Applescript Users
Subject: Re: question for sending multiple requests to iTunes

Maybe you are encountering the following issue described in this 
document :

<http://developer.apple.com/documentation/mac/pdf/
Interapplication_Communication/Scripting_Components.pdf#search=%
22COmponent INstance MultiThreading AppleScript">

"Your application may maintain several connections to a single 
component, or it may have connections to several components at the 
same time. Because some scripting components (including the current 
version of AppleScript) can execute only one script at a time per 
component instance, a multithreaded application must provide a 
separate component instance for each script that it compiles or 
executes while it is simultaneously executing other scripts."

--
Jean-Baptiste LE STANG

On Sep 1, 2006, at 11:39 PM, Philip Lukidis wrote:

> Hello.  I'm not if the problem which I'm am experiencing is a cocoa 
> issue or an Applescript issue.  Briefly, my application accesses 
> iTunes via AppleScript, specifically by using cocoa NSAppleScript 
> objects.  Each script file is associated with its own NSAppleScript 
> object, and access to it is protected with a pthread_mutex, so it's 
> quite impossible for 2 threads to call the same script 
> simultaneously.  However, I'm finding that unless I synchronize 
> access to these script objects globally in my process (i.e. one 
> mutex for all calls), parallel calls to different scripts produce a 
> resounding crash.
>
> Now, I could understand why there would be a crash if two threads 
> tried to access the same script object in parallel, but I cannot 
> understand why there would be a problem with two threads accessing 
> different scripts simultaneously.
>
> Can anyone explain why this would be a problem?
>
> thanks,
>
> Philip Lukidis
>  _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Applescript-users mailing list      (Applescript-
> email@hidden)
> Help/Unsubscribe/Update your Subscription:
> 40lestang.org
>
> This email sent to email@hidden
>



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >question for sending multiple requests to iTunes (From: "Philip Lukidis" <email@hidden>)
 >Re: question for sending multiple requests to iTunes (From: Le Stang Jean-Baptiste <email@hidden>)

  • Prev by Date: Re: Send Terminal window crtl-c
  • Next by Date: Re: Send Terminal window crtl-c
  • Previous by thread: Re: question for sending multiple requests to iTunes
  • Next by thread: Re: Changing Quark
  • Index(es):
    • Date
    • Thread