thread rootProxy problem
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