On Feb 12, 2009, at 1:29 PM, Alex Curylo wrote:

So I'm a bit confused about how my NSOperation subclass should implement the cancel method.

Why are you overriding it? The -cancel method is not supposed to actively bring the operation to a stop. It's only supposed to set a flag. The operation's work methods (-start, -main, and whatever they call) should be periodically checking the -isCancelled property and, if it's set, gracefully bring their work to an end.

Regards,
Ken

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to