Re: Cancelable NSBlockOperations
Re: Cancelable NSBlockOperations
- Subject: Re: Cancelable NSBlockOperations
- From: Nick Zitzmann <email@hidden>
- Date: Thu, 14 Jan 2010 12:59:58 -0700
On Jan 14, 2010, at 12:30 PM, Jamie Hardt wrote:
> How does one support -cancel in an NSBlockOperation? Testing [NSThread isCancelled] doesn't appear to work.
The same way you do it with NSInvocationOperations - pass in the operation as an argument to the block and check the object's cancellation state using that argument.
Nick Zitzmann
<http://www.chronosnet.com/>
_______________________________________________
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