Re: Waiting for callback with GCD: impossible?
Re: Waiting for callback with GCD: impossible?
- Subject: Re: Waiting for callback with GCD: impossible?
- From: Jens Alfke <email@hidden>
- Date: Wed, 08 Oct 2014 12:59:16 -0700
> On Oct 8, 2014, at 12:06 PM, davekeck . <email@hidden> wrote:
>
> You could use some other signaling mechanism -- a dispatch_semaphore_t
> or NSConditionLock, for example.
Yeah, but that doesn't work for the async mode, where I need a dispatch_async call to queue A to notify it.
Maybe I'd also need a shared flag that indicates async vs. sync mode, and queue B would look at the flag and either dispatch a block or toggle the condition based on its state.
—Jens
_______________________________________________
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