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

qualityOfService

The default service level to apply to operations that the queue invokes.

Declaration 宣言

var qualityOfService: QualityOfService { get set }

Discussion 議論

This property specifies the service level applied to operation objects added to the queue. If the operation object has an explicit service level set, that value is used instead. The default value of this property depends on how you created the queue. For queues you create yourself, the default value is NSOperationQualityOfServiceBackground. For the queue returned by the main method, the default value is NSOperationQualityOfServiceUserInteractive and cannot be changed. このプロパティは、キューに加えられるオペレーションオブジェクトに適用されるサービスレベルを指定します。オペレーションオブジェクトがある明示的なサービスレベルを設定されているならば、その値が代わりに使われます。このプロパティの省略時の値は、あなたがキューを作成する方法に依存します。あなたがあなた自身で作成するキューに対して、省略時の値はNSOperationQualityOfServiceBackgroundです。mainメソッドによって返されるキューに対して、省略時の値はNSOperationQualityOfServiceUserInteractiveです、そして変更されることはできません。

Service levels affect the priority with which operation objects are given access to system resources such as CPU time, network resources, disk resources, and so on. Operations with a higher quality of service level are given greater priority over system resources so that they may perform their task more quickly. You use service levels to ensure that operations responding to explicit user requests are given priority over less critical work. サービスレベルは、それを使ってオペレーションオブジェクトそれらがシステムリソース、例えばCPU時間、ネットワークリソース、ディスクリソース、などへのアクセスを与えられる優先度に影響を与えます。サービスレベルのより高い品質でのオペレーションは、システムリソースに対してより大きな優先度を与えられます、それでそれらはより素早くそれらのタスクを実行するかもしれません。あなたはサービスレベルを使うことで、明示的なユーザリクエストに応答するオペレーションがより重大でない仕事を越える優先度を与えられることを確実にします。

See Also 参照

Managing the Execution of Operations オペレーションの遂行を管理する