• 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: DO message received on wrong thread
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: DO message received on wrong thread


  • Subject: Re: DO message received on wrong thread
  • From: "Adam R. Maxwell" <email@hidden>
  • Date: Tue, 8 May 2007 19:58:59 -0700


On Apr 23, 2007, at 07:55, Adam R. Maxwell wrote:

I'm having a hard time tracking down a Distributed Objects problem, and wonder if anyone can provide some insight. We do some background processing on a worker/server thread, which sits idle until it gets a message via a proxy to do some work.

[...]

If we pass an empty string as the aString argument, no work is done in the server method, and the server's message that work is complete ends up being received on the server thread (when it should be received on the main thread). If I run the runloop briefly before messaging mainThreadProxy, things work as expected, but I'd like to understand what's going on, since this could potentially cause problems in various parts of the code.

For the archives: the runloop issue was a complete red herring. The problem was that we were messaging the worker thread /from/ the worker thread using its proxy. Using [self doSomething] instead of [proxy doSomething] fixed the problem. It's still not clear why this is a problem (does anyone really understand DO?), but at least we've fixed the crashes.


--
Adam
_______________________________________________

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


  • Prev by Date: Re: NSScanner Sanity Check
  • Next by Date: Re: NSScanner Sanity Check
  • Previous by thread: Re: Keyed multi-values in Spotlight importer?
  • Next by thread: Sorting result of distinctUnionOfObjects of NSArrayController
  • Index(es):
    • Date
    • Thread