Instance Property

operationCount

The number of operations currently in the queue.

Declaration

@property(readonly) NSUInteger operationCount;

Discussion

Because the number of operations in the queue changes as those operations finish executing, the value returned by this property reflects the instantaneous number of operations at the time the property was accessed. By the time you use the value, the actual number of operations may be different. As a result, do not use this value for object enumerations or other precise calculations.

You may monitor changes to the value of this property using Key-value observing. Configure an observer to monitor the operationCount key path of the operation 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.

operations

The operations currently in the queue.

Deprecated
- cancelAllOperations

Cancels all queued and executing operations.

- waitUntilAllOperationsAreFinished

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