On Mar 6, 2011, at 13:08:15, Jeremy Gale wrote:
> On Sun, Mar 6, 2011 at 2:00 PM, Peter Hosey <[email protected]> wrote:
>> If you mean your app is taking to both iTunes and Growl at the same time on 
>> different threads, then yes, that could be the problem.
> 
> Yes, that can definitely happen with my app. Is that inherently a problem?

As far as I know, your app has only one reply port, so it may be.

Of note: If EyeTunes is also using the synchronous calls, but the reply for 
Growl comes in first (or vice versa), then the reply for Growl (or for 
EyeTunes) might get eaten and dropped.

> Would it be worth it for me to try ensuring all Apple Event calls and Growl 
> calls are protected by a @synchronized block with a single semaphore even 
> though they may be on different threads?

Either that or do all such accesses on the main thread. The result is the same: 
Your main thread will be blocked until the reply comes back, which will be 
pretty quickly for Growl and probably a few seconds for iTunes.

For debugging, I'd say go for it, but for release, you'll need to do better 
than that. If serializing events and their replies works, then move the 
EyeTunes-access code into a subprocess and communicate with it via DO.

-- 
You received this message because you are subscribed to the Google Groups 
"Growl Discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/growldiscuss?hl=en.

Reply via email to