On Mar 1, 2017, at 4:23 PM, Carl Hoefs <newsli...@autonomy.caltech.edu> wrote: > > The NSOperation -cancel and NSOperationQueue -cancelAllOperations methods > merely set a property that needs to be periodically and cooperatively checked > and acted upon by the receiving NSOperation. > > Normally, that is sufficient. But under some circumstances, it's possible for > an executing NSOperation to get hung up doing I/O or for some other reason. > No means is given to forcibly stop the execution of an NSOperation, and > there's no -thread method to obtain its thread and terminate it. > > Does GCD allow this level of introspection and control of executing blocks?
No. In general, you can't reliably and safely terminate a thread from outside of that thread. That's why NSOperation works the way it does. 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com