Distributed object and run loops I didn't start
Distributed object and run loops I didn't start
- Subject: Distributed object and run loops I didn't start
- From: James Bucanek <email@hidden>
- Date: Fri, 9 Mar 2007 11:50:58 -0700
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
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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