<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: 17.0.0 -",
    "macOS: 14.0.0 -",
    "tvOS: 17.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Swift",
  "identifier" : "/documentation/Swift/JobPriority",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Swift"
    ],
    "preciseIdentifier" : "s:12_Concurrency11JobPriorityV"
  },
  "title" : "JobPriority"
}
-->

# JobPriority

The priority of this job.

```
@frozen struct JobPriority
```

## Overview

The executor determines how priority information affects the way tasks are scheduled.
The behavior varies depending on the executor currently being used.
Typically, executors attempt to run tasks with a higher priority
before tasks with a lower priority.
However, the semantics of how priority is treated are left up to each
platform and `Executor` implementation.

A ExecutorJob’s priority is roughly equivalent to a `TaskPriority`,
however, since not all jobs are tasks, represented as separate type.

Conversions between the two priorities are available as initializers on the respective types.

## Topics

### Operators

[`static func != (JobPriority, JobPriority) -> Bool`](/documentation/Swift/JobPriority/!=(_:_:))

### Initializers

[`init(TaskPriority)`](/documentation/Swift/JobPriority/init(_:))

Construct from a TaskPriority

[`init(rawValue: JobPriority.RawValue)`](/documentation/Swift/JobPriority/init(rawValue:))

Construct from a raw value

### Instance Properties

[`var rawValue: JobPriority.RawValue`](/documentation/Swift/JobPriority/rawValue-swift.property)

The raw priority value.

### Type Aliases

[`typealias RawValue`](/documentation/Swift/JobPriority/RawValue-swift.typealias)

### Default Implementations

[Comparable Implementations](/documentation/Swift/JobPriority/Comparable-Implementations)

[Equatable Implementations](/documentation/Swift/JobPriority/Equatable-Implementations)

## Relationships

### Conforms To

[`Comparable`](/documentation/Swift/Comparable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Equatable`](/documentation/Swift/Equatable)

[`BitwiseCopyable`](/documentation/Swift/BitwiseCopyable)

[`Copyable`](/documentation/Swift/Copyable)

[`Sendable`](/documentation/Swift/Sendable)

---

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)