Skip to content

Commit d3d87e8

Browse files
[Concurrency] Deprecate typealias PartialAsyncTask (#38042)
Deprecate typealias PartialAsyncTask, and move it into the "SourceCompatibilityShims.swift" file.
1 parent ae83f0e commit d3d87e8

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

stdlib/public/Concurrency/PartialAsyncTask.swift

Lines changed: 1 addition & 5 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
@@ -13,10 +13,6 @@
1313
import Swift
1414
@_implementationOnly import _SwiftConcurrencyShims
1515

16-
/// TODO: remove this before shipping
17-
@available(SwiftStdlib 5.5, *)
18-
public typealias PartialAsyncTask = UnownedJob
19-
2016
/// A job is a unit of scheduleable work.
2117
@available(SwiftStdlib 5.5, *)
2218
@frozen

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
@@ -8,6 +8,8 @@ import _Concurrency
88
// short-term source compatibility)
99
@available(SwiftStdlib 5.5, *)
1010
extension PartialAsyncTask {
11+
// expected-warning@-1 {{'PartialAsyncTask' is deprecated: renamed to 'UnownedJob'}}
12+
// expected-note@-2 {{use 'UnownedJob' instead}}
1113
}
1214
@available(SwiftStdlib 5.5, *)
1315
extension UnownedJob {

0 commit comments

Comments
 (0)