• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Cancelable NSBlockOperations
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cancelable NSBlockOperations


  • Subject: Re: Cancelable NSBlockOperations
  • From: Jamie Hardt <email@hidden>
  • Date: Thu, 14 Jan 2010 12:02:41 -0800

On Jan 14, 2010, at 11:59 AM, Nick Zitzmann wrote:

> 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.

The block that NSBlockOperation takes is (void)^(void), do you mean I have to declare it outside of the block scope and let the block copy the reference when it invokes?

Jamie_______________________________________________

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

  • Follow-Ups:
    • Re: Cancelable NSBlockOperations
      • From: Nick Zitzmann <email@hidden>
References: 
 >Cancelable NSBlockOperations (From: Jamie Hardt <email@hidden>)
 >Re: Cancelable NSBlockOperations (From: Nick Zitzmann <email@hidden>)

  • Prev by Date: Re: Cancelable NSBlockOperations
  • Next by Date: Re: Cancelable NSBlockOperations
  • Previous by thread: Re: Cancelable NSBlockOperations
  • Next by thread: Re: Cancelable NSBlockOperations
  • Index(es):
    • Date
    • Thread