• 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
thread rootProxy problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

thread rootProxy problem


  • Subject: thread rootProxy problem
  • From: "William Zumwalt" <email@hidden>
  • Date: Sat, 13 Jan 2007 16:16:19 -0600

NSConnection *connection = [[NSConnection alloc]
		initWithReceivePort:[portArray objectAtIndex:0]
		sendPort:[portArray objectAtIndex:1]];
// ...
[connection rootProxy];

In the code above, I think I have a problem where I launch a thread,
but the thread seems to be blocking on this call [connection
rootProxy], and so my application is locked up because I use
NSConditionLock to wait till the thread is setup before my app
continues. Then I saw in the documentation that said ...

Note: If the NSConnection object uses separate send and receive ports
and has no peer, when you invoke rootProxy it will block for the
duration of the reply timeout interval, waiting for a reply.

I kind of think this is what is happening, but now sure how to fix it.
From the code above, is that considered separate send and receive
ports? Is there something I'm supposed to do to setup the peer (my
main thread that launches this I guess).
_______________________________________________

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: Replacing NSTextView with custom view?
  • Next by Date: Querying key bindings?
  • Previous by thread: Re: Replacing NSTextView with custom view?
  • Next by thread: Querying key bindings?
  • Index(es):
    • Date
    • Thread