Instance Method


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


- (void)waitUntilAllOperationsAreFinished;


When called, this method blocks the current thread and waits for the receiver’s current and queued operations to finish executing. While the current thread is blocked, the receiver continues to launch already queued operations and monitor those that are executing. During this time, the current thread cannot add operations to the queue, but other threads may. Once all of the pending operations are finished, this method returns.

If there are no operations in the queue, this method returns immediately.

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.

- cancelAllOperations

Cancels all queued and executing operations.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software