Instance Method


Cancels all queued and executing operations.


- (void)cancelAllOperations;


This method calls the cancel method on all operations currently in the queue.

Canceling the operations does not automatically remove them from the queue or stop those that are currently executing. For operations that are queued and waiting execution, the queue must still attempt to execute the operation before recognizing that it is canceled and moving it to the finished state. For operations that are already executing, the operation object itself must check for cancellation and stop what it is doing so that it can move to the finished state. In both cases, a finished (or canceled) operation is still given a chance to execute its completion block before it is removed from the queue.

See Also

Managing Operations in the Queue

- addOperation:

Adds the specified operation to the receiver.

- addOperations:waitUntilFinished:

Adds the specified operations to the queue.

- addOperationWithBlock:

Wraps the specified block in an operation and adds it to the receiver.


The operations currently in the queue.


The number of operations currently in the queue.

- waitUntilAllOperationsAreFinished

Blocks the current thread until all of the receiver’s queued and executing operations finish executing.