<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.5.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/Operation/queuePriority-swift.property",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSOperation(py)queuePriority"
  },
  "title" : "queuePriority"
}
-->

# queuePriority

The execution priority of the operation in an operation queue.

```
var queuePriority: Operation.QueuePriority { get set }
```

## Discussion

This property contains the relative priority of the operation. This value is used to influence the order in which operations are dequeued and executed. The returned value always corresponds to one of the predefined constants. (For a list of valid values, see [`Operation.QueuePriority`](/documentation/Foundation/Operation/QueuePriority-swift.enum).) If no priority is explicitly set, this method returns `NSOperationQueuePriorityNormal`.

You should use priority values only as needed to classify the relative priority of non-dependent operations. Priority values should not be used to implement dependency management among different operation objects. If you need to establish dependencies between operations, use the [`addDependency(_:)`](/documentation/Foundation/Operation/addDependency(_:)) method instead.

If you attempt to specify a priority value that does not match one of the defined constants, the operation object automatically adjusts the value you specify towards the `NSOperationQueuePriorityNormal` priority, stopping at the first valid constant value. For example, if you specified the value -10, the operation would adjust that value to match the `NSOperationQueuePriorityVeryLow` constant. Similarly, if you specified +10, this operation would adjust the value to match the `NSOperationQueuePriorityVeryHigh` constant.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)