Re: Dispatch IO
Re: Dispatch IO
- Subject: Re: Dispatch IO
- From: Quincey Morris <email@hidden>
- Date: Fri, 09 Aug 2013 13:29:45 -0700
On Aug 9, 2013, at 12:37 , Greg Parker <email@hidden> wrote:
> The assumption is that if you're destroying the semaphore and the count doesn't match then there is some worker still in progress that is going to signal the dead semaphore later. Detecting this error at semaphore destruction time instead of crashing at dead-semaphore signal time is a safety feature.
I believe I mentioned, the last time this came up, that I know of at least one case where matching isn't possible: AudioQueues. If the resource being counted is AudioQueueBuffers, stopping the queue discards any buffers that have been passed to the framework, without the callback being called to indicate this (and it's documented to behave this way).
> you can use whatever crazy unbalanced algorithms you like
Hey, buddy, that one ain't *my* crazy algorithm! ;)
However, the alternative approach is a fine, er, alternative.
_______________________________________________
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