Skip to content

Commit f692fae

Browse files
committed
[SE-0304] Rename TaskPriority.default to medium
1 parent 04dd840 commit f692fae

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

stdlib/public/Concurrency/Task.swift

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,11 +202,20 @@ public struct TaskPriority: RawRepresentable, Sendable {
202202
}
203203

204204
public static let high: TaskPriority = .init(rawValue: 0x19)
205-
public static let userInitiated: TaskPriority = high
206-
public static let `default`: TaskPriority = .init(rawValue: 0x15)
205+
206+
@_alwaysEmitIntoClient
207+
public static var medium: TaskPriority {
208+
.init(rawValue: 0x15)
209+
}
210+
207211
public static let low: TaskPriority = .init(rawValue: 0x11)
212+
213+
public static let userInitiated: TaskPriority = high
208214
public static let utility: TaskPriority = low
209215
public static let background: TaskPriority = .init(rawValue: 0x09)
216+
217+
@available(*, deprecated, renamed: "medium")
218+
public static let `default`: TaskPriority = .init(rawValue: 0x15)
210219
}
211220

212221
@available(SwiftStdlib 5.5, *)

0 commit comments

Comments
 (0)