Contents

operations

The operations currently in the queue.

Declaration

var operations: [Operation] { get }

Discussion

The array in this property contains zero or more Operation objects in the order you added them to the queue. This order doesn’t necessarily reflect the order in which the queue invokes those operations.

You can use this property to access the operations queued at any given moment. Operations remain queued until they finish their task. Therefore, the array may contain operations that are currently running or waiting to run. The list may also contain operations that were running when you retrieved the array but have subsequently finished.

You can monitor changes to the value of this property using Key-value observing (KVO). Configure an observer to monitor the operations key path of the operation queue.

See Also

Managing Operations in the Queue