Skip to content

[5.5] [Concurrency] Deprecate typealias PartialAsyncTask #38064

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions stdlib/public/Concurrency/PartialAsyncTask.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2020 Apple Inc. and the Swift project authors
// Copyright (c) 2020 - 2021 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
Expand All @@ -16,11 +16,7 @@ import Swift
/// A unit of scheduleable work.
///
/// Unless you're implementing a scheduler,
/// you don't generally interact with partial tasks directly.
@available(SwiftStdlib 5.5, *)
public typealias PartialAsyncTask = UnownedJob

/// A job is a unit of scheduleable work.
/// you don't generally interact with jobs directly.
@available(SwiftStdlib 5.5, *)
@frozen
public struct UnownedJob {
Expand Down
6 changes: 5 additions & 1 deletion stdlib/public/Concurrency/SourceCompatibilityShims.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2020 Apple Inc. and the Swift project authors
// Copyright (c) 2020 - 2021 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
Expand Down Expand Up @@ -255,3 +255,7 @@ extension ThrowingTaskGroup {
@available(SwiftStdlib 5.5, *)
@available(*, deprecated, message: "please use UnsafeContination<..., Error>")
public typealias UnsafeThrowingContinuation<T> = UnsafeContinuation<T, Error>

@available(SwiftStdlib 5.5, *)
@available(*, deprecated, renamed: "UnownedJob")
public typealias PartialAsyncTask = UnownedJob
2 changes: 2 additions & 0 deletions test/stdlib/Concurrency.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import _Concurrency
// Make sure the type shows up
@available(SwiftStdlib 5.5, *)
extension PartialAsyncTask {
// expected-warning@-1 {{'PartialAsyncTask' is deprecated: renamed to 'UnownedJob'}}
// expected-note@-2 {{use 'UnownedJob' instead}}
}
@available(SwiftStdlib 5.5, *)
extension UnownedJob {
Expand Down