Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Distributed object and run loops I didn't start
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Distributed object and run loops I didn't start

I'm pretty sure I already know the answer to the question, but I'm tossing it out just in case someone has a better suggestion.

I have UIElement Cocoa application. This acts as a display service for multiple Foundation tools running in the background. The worker processes talk to the display application using distributed objects. Most of the messages they send get turned into simple GUI calls to update text field values, progress thermometers, open windows, etc.

This has been running fine until user X shows up. User X has Unsanity's APE installed. When they run my application, the UIElement application hangs. I had them send me an Activity Monitor sample and the stack trace shows that some APE modules have started their own run loops.

From pervious experience, I know that distributed object messages are sent to whatever run loop is waiting at the moment, even if that's not the thread that registered the NSConnection. What I suspect is happening is that the run loop inserted by the APE module is trying to service the message, which ends up calling GUI code, which isn't thread safe and shouldn't be executed on another thread.

Is there anyway to prevent DO messages from being sent to run loops running in another thread? I really don't want to turn on independent conversation queuing, as I have call backs that would cause dead-lock issues.

The only thing I can think of is to rewrite *every* public message that might be sent via DO so that it resends the message on the main thread. This, of course is a huge flog that I'm not happy about at all.

And is there anyone else who hates Unsanity/APE more that I do right now?

James Bucanek
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

Visit the Apple Store online or at retail locations.

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.