Skip to content

Commit b51c0ea

Browse files
authored
Merge pull request #38064 from benrimmington/partial-async-task-5.5
[5.5] [Concurrency] Deprecate typealias PartialAsyncTask
2 parents 2c27eb3 + ffd39c6 commit b51c0ea

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

stdlib/public/Concurrency/PartialAsyncTask.swift

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// This source file is part of the Swift.org open source project
44
//
5-
// Copyright (c) 2020 Apple Inc. and the Swift project authors
5+
// Copyright (c) 2020 - 2021 Apple Inc. and the Swift project authors
66
// Licensed under Apache License v2.0 with Runtime Library Exception
77
//
88
// See https://swift.org/LICENSE.txt for license information
@@ -16,11 +16,7 @@ import Swift
1616
/// A unit of scheduleable work.
1717
///
1818
/// Unless you're implementing a scheduler,
19-
/// you don't generally interact with partial tasks directly.
20-
@available(SwiftStdlib 5.5, *)
21-
public typealias PartialAsyncTask = UnownedJob
22-
23-
/// A job is a unit of scheduleable work.
19+
/// you don't generally interact with jobs directly.
2420
@available(SwiftStdlib 5.5, *)
2521
@frozen
2622
public struct UnownedJob {

stdlib/public/Concurrency/SourceCompatibilityShims.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// This source file is part of the Swift.org open source project
44
//
5-
// Copyright (c) 2020 Apple Inc. and the Swift project authors
5+
// Copyright (c) 2020 - 2021 Apple Inc. and the Swift project authors
66
// Licensed under Apache License v2.0 with Runtime Library Exception
77
//
88
// See https://swift.org/LICENSE.txt for license information
@@ -255,3 +255,7 @@ extension ThrowingTaskGroup {
255255
@available(SwiftStdlib 5.5, *)
256256
@available(*, deprecated, message: "please use UnsafeContination<..., Error>")
257257
public typealias UnsafeThrowingContinuation<T> = UnsafeContinuation<T, Error>
258+
259+
@available(SwiftStdlib 5.5, *)
260+
@available(*, deprecated, renamed: "UnownedJob")
261+
public typealias PartialAsyncTask = UnownedJob

test/stdlib/Concurrency.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ import _Concurrency
77
// Make sure the type shows up
88
@available(SwiftStdlib 5.5, *)
99
extension PartialAsyncTask {
10+
// expected-warning@-1 {{'PartialAsyncTask' is deprecated: renamed to 'UnownedJob'}}
11+
// expected-note@-2 {{use 'UnownedJob' instead}}
1012
}
1113
@available(SwiftStdlib 5.5, *)
1214
extension UnownedJob {

0 commit comments

Comments
 (0)