The number of operations currently in the queue.
- iOS 4.0–13.0Deprecated
- macOS 10.6–10.15Deprecated
- Mac Catalyst 13.0–13.0Deprecated
- tvOS 9.0–13.0Deprecated
- watchOS 2.0–6.0Deprecated
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
operation key path of the operation queue.