Re: -[NSOperationQueue cancelAllOperations] cleans queue, but not immediately?!
Re: -[NSOperationQueue cancelAllOperations] cleans queue, but not immediately?!
- Subject: Re: -[NSOperationQueue cancelAllOperations] cleans queue, but not immediately?!
- From: Ken Thomases <email@hidden>
- Date: Wed, 31 Mar 2010 17:12:20 -0500
On Mar 31, 2010, at 5:03 PM, Jerry Krinock wrote:
> So Ken I believe you're saying that the "cancelled" operations become ready to run immediately, which they do (as no-ops), which removes them from the queue. In *effect* therefore, "are cancelled before they begin executing" *does indeed* == "removed from queue".
Yes, with the caveat that it can take some time. An arbitrary amount.
> But maybe this is not true in 10.5?
On 10.5, -cancel does not make the receiver ready. So, it still has to wait to become ready in the normal way. If you haven't overridden what readiness means, then the operation just has to wait for all of its dependencies to finish. You can remove the dependencies at the same time you cancel the operations, if you like, but there's no one-method way to do that.
Cheers,
Ken
_______________________________________________
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