Skip to content

Commit 3d4a7e6

Browse files
authored
Merge pull request #61939 from kavon/5.7-annotate_inherits_backdeploy
[5.7] add missing `@_unsafeInheritExecutor`'s to backdeploy library
2 parents 55f8902 + bffab02 commit 3d4a7e6

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

stdlib/public/BackDeployConcurrency/CheckedContinuation.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,7 @@ extension CheckedContinuation {
262262
/// - body: A closure that takes a `CheckedContinuation` parameter.
263263
/// You must resume the continuation exactly once.
264264
@available(SwiftStdlib 5.1, *)
265+
@_unsafeInheritExecutor // ABI compatibility with Swift 5.1
265266
public func withCheckedContinuation<T>(
266267
function: String = #function,
267268
_ body: (CheckedContinuation<T, Never>) -> Void
@@ -284,6 +285,7 @@ public func withCheckedContinuation<T>(
284285
/// If `resume(throwing:)` is called on the continuation,
285286
/// this function throws that error.
286287
@available(SwiftStdlib 5.1, *)
288+
@_unsafeInheritExecutor // ABI compatibility with Swift 5.1
287289
public func withCheckedThrowingContinuation<T>(
288290
function: String = #function,
289291
_ body: (CheckedContinuation<T, Error>) -> Void

stdlib/public/BackDeployConcurrency/PartialAsyncTask.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,7 @@ internal func _resumeUnsafeThrowingContinuationWithError<T>(
254254
///
255255
/// - Returns: The value passed to the continuation by the closure.
256256
@available(SwiftStdlib 5.1, *)
257+
@_unsafeInheritExecutor
257258
@_alwaysEmitIntoClient
258259
public func withUnsafeContinuation<T>(
259260
_ fn: (UnsafeContinuation<T, Never>) -> Void
@@ -274,6 +275,7 @@ public func withUnsafeContinuation<T>(
274275
/// If `resume(throwing:)` is called on the continuation,
275276
/// this function throws that error.
276277
@available(SwiftStdlib 5.1, *)
278+
@_unsafeInheritExecutor
277279
@_alwaysEmitIntoClient
278280
public func withUnsafeThrowingContinuation<T>(
279281
_ fn: (UnsafeContinuation<T, Error>) -> Void

stdlib/public/BackDeployConcurrency/TaskGroup.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ import Swift
6565
/// use the `withThrowingTaskGroup(of:returning:body:)` method instead.
6666
@available(SwiftStdlib 5.1, *)
6767
@_silgen_name("$ss13withTaskGroup2of9returning4bodyq_xm_q_mq_ScGyxGzYaXEtYar0_lF")
68+
@_unsafeInheritExecutor
6869
@inlinable
6970
public func withTaskGroup<ChildTaskResult, GroupResult>(
7071
of childTaskResultType: ChildTaskResult.Type,
@@ -157,6 +158,7 @@ public func withTaskGroup<ChildTaskResult, GroupResult>(
157158
/// or to let the group rethrow the error.
158159
@available(SwiftStdlib 5.1, *)
159160
@_silgen_name("$ss21withThrowingTaskGroup2of9returning4bodyq_xm_q_mq_Scgyxs5Error_pGzYaKXEtYaKr0_lF")
161+
@_unsafeInheritExecutor
160162
@inlinable
161163
public func withThrowingTaskGroup<ChildTaskResult, GroupResult>(
162164
of childTaskResultType: ChildTaskResult.Type,

0 commit comments

Comments
 (0)