Instance Property インスタンスプロパティ

operationCount

The number of operations currently in the queue. 現在キューの中にあるオペレーションの数。

Declaration 宣言

var operationCount: Int { get }

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. あなたは、このプロパティへの変更をキー値監視を使って監視するかもしれません。ひとつのオブザーバを構成設定して、オペレーションキューのoperationCountキーパスを監視してください。

See Also 参照

Managing Operations in the Queue キューの中のオペレーションそれらを管理する