Re: Waiting for callback with GCD: impossible?
Re: Waiting for callback with GCD: impossible?
- Subject: Re: Waiting for callback with GCD: impossible?
- From: "davekeck ." <email@hidden>
- Date: Wed, 08 Oct 2014 15:06:01 -0400
> * Now, how does queue A wait for the callback? It seems to be impossible: the only way for code running on queue A to receive the callback is to return back to the queue dispatcher, so if it tries to wait it simply blocks the queue, causing a deadlock.
You could use some other signaling mechanism -- a dispatch_semaphore_t
or NSConditionLock, for example.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please 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