I'm using In the If I understand this right, then this Waiting in the queue will cancel all the tasks - which means that the operation not yet started, but what is with the ongoing operation? From the document of the apple An operation stays in its queue until it does not report that it has ended with its work, to eliminate its work does not mean that the operation has been completed to complete this task. Done An operation can also be canceled. Canceling an operation object leaves the object in the queue but informs the object that it should cancel its work as soon as possible. To implement currently it means that the operation code of the operation object should check the status of cancellation, what it is doing, and mark it to the end itself, which are queued for the operation, but so far Not executed, the queue should still call the startup method of the operation object so that it can process the cancellation incidents and terminate itself. AFNetworking
AFHTTPClient for example, But this question is generally about the
NSOperation QQ
AFHTTPClient a
NSOperationQueue for requests made by the client Manage
cancel all operation method in the
self. Operation quoU.Operation and for each one,
[cancel operation] call
P> Currently, to execute the operation, it means that the operation code of the operation object should be checked, what it is doing, and mark it as the end of the queue for the operation, But not yet executed, the queue is still the initial method of the operation object Should the call so that it can be processed by the event of cancellation and an end to itself.
Comments
Post a Comment