Skip to content

Commit 25a963e

Browse files
committed
[Concurrency] latest cancellation handler is emit into client; no ABI entry
1 parent 81b6741 commit 25a963e

File tree

4 files changed

+3
-29
lines changed

4 files changed

+3
-29
lines changed

stdlib/public/Concurrency/TaskCancellation.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,6 @@ public func withTaskCancellationHandler<T>(
8585
// with the operation closure. Instead, we should do what the docs of this method promise - and not hop at all,
8686
// by using the new nonisolated(nonsending)
8787
@available(SwiftStdlib 5.1, *)
88-
//#if !$Embedded
89-
//@backDeployed(before: SwiftStdlib 6.0)
90-
//#endif
9188
@_silgen_name("$ss27withTaskCancellationHandler9operation8onCancel9isolationxxyYaKXE_yyYbXEScA_pSgYitYaKlF")
9289
public func _isolatedParam_withTaskCancellationHandler<T>(
9390
operation: () async throws -> T,

test/abi/macOS/arm64/concurrency.swift

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -320,12 +320,6 @@ Added: _$sScf13checkIsolatedyyFTq
320320
// withTaskCancellationHandler gains #isolated
321321
Added: _$ss27withTaskCancellationHandler9operation8onCancel9isolationxxyYaKXE_yyYbXEScA_pSgYitYaKlF
322322
Added: _$ss27withTaskCancellationHandler9operation8onCancel9isolationxxyYaKXE_yyYbXEScA_pSgYitYaKlFTu
323-
// withTaskCancellationHandler but with caller execution
324-
// Swift.withTaskCancellationHandler<A>(operation: nonisolated(nonsending) () async throws -> A, onCancel: @Sendable () -> ()) async throws -> A
325-
// async function pointer to Swift.withTaskCancellationHandler<A>(operation: nonisolated(nonsending) () async throws -> A, onCancel: @Sendable () -> ()) async throws -> A
326-
Added: _$ss27withTaskCancellationHandler9operation8onCancelxxyYaKYCXE_yyYbXEtYaKlF
327-
Added: _$ss27withTaskCancellationHandler9operation8onCancelxxyYaKYCXE_yyYbXEtYaKlFTu
328-
329323
// TaskGroup.with... APIs gain #isolated
330324
Added: _$ss23withDiscardingTaskGroup9returning9isolation4bodyxxm_ScA_pSgYixs0bcD0VzYaXEtYalF
331325
Added: _$ss23withDiscardingTaskGroup9returning9isolation4bodyxxm_ScA_pSgYixs0bcD0VzYaXEtYalFTu

test/abi/macOS/x86_64/concurrency.swift

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -320,12 +320,6 @@ Added: _$sScf13checkIsolatedyyFTq
320320
// withTaskCancellationHandler gains #isolated
321321
Added: _$ss27withTaskCancellationHandler9operation8onCancel9isolationxxyYaKXE_yyYbXEScA_pSgYitYaKlF
322322
Added: _$ss27withTaskCancellationHandler9operation8onCancel9isolationxxyYaKXE_yyYbXEScA_pSgYitYaKlFTu
323-
// withTaskCancellationHandler but with caller execution
324-
// Swift.withTaskCancellationHandler<A>(operation: nonisolated(nonsending) () async throws -> A, onCancel: @Sendable () -> ()) async throws -> A
325-
// async function pointer to Swift.withTaskCancellationHandler<A>(operation: nonisolated(nonsending) () async throws -> A, onCancel: @Sendable () -> ()) async throws -> A
326-
Added: _$ss27withTaskCancellationHandler9operation8onCancelxxyYaKYCXE_yyYbXEtYaKlF
327-
Added: _$ss27withTaskCancellationHandler9operation8onCancelxxyYaKYCXE_yyYbXEtYaKlFTu
328-
329323
// TaskGroup.with... APIs gain #isolated
330324
Added: _$ss23withDiscardingTaskGroup9returning9isolation4bodyxxm_ScA_pSgYixs0bcD0VzYaXEtYalF
331325
Added: _$ss23withDiscardingTaskGroup9returning9isolation4bodyxxm_ScA_pSgYixs0bcD0VzYaXEtYalFTu

test/api-digester/stability-concurrency-abi.test

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,9 @@ Func withCheckedThrowingContinuation(function:_:) has parameter 0 type change fr
8989
Func withCheckedThrowingContinuation(function:_:) has parameter 1 type change from (_Concurrency.CheckedContinuation<τ_0_0, any Swift.Error>) -> () to Swift.String
9090

9191
// #isolation adoption for cancellation handlers; old APIs are kept ABI compatible
92-
Func withTaskCancellationHandler(operation:onCancel:) has been renamed to Func withTaskCancellationHandler(operation:onCancel:isolation:)
93-
Func withTaskCancellationHandler(operation:onCancel:) has mangled name changing from '_Concurrency.withTaskCancellationHandler<A>(operation: () async throws -> A, onCancel: @Sendable () -> ()) async throws -> A' to '_Concurrency.withTaskCancellationHandler<A>(operation: () async throws -> A, onCancel: @Sendable () -> (), isolation: isolated Swift.Optional<Swift.Actor>) async throws -> A'
92+
// but ABI checker does not understand the silgen_names on the ABi-compat APIs
93+
Func withTaskCancellationHandler(operation:onCancel:) has mangled name changing from '_Concurrency.withTaskCancellationHandler<A>(operation: () async throws -> A, onCancel: @Sendable () -> ()) async throws -> A' to '_Concurrency._isolatedParam_withTaskCancellationHandler<A>(operation: () async throws -> A, onCancel: @Sendable () -> (), isolation: isolated Swift.Optional<Swift.Actor>) async throws -> A'
94+
Func withTaskCancellationHandler(operation:onCancel:) has been renamed to Func _isolatedParam_withTaskCancellationHandler(operation:onCancel:isolation:)
9495

9596
// #isolated was adopted and the old methods kept: $ss31withCheckedThrowingContinuation8function_xSS_yScCyxs5Error_pGXEtYaKlF
9697
Func withCheckedContinuation(function:_:) has been renamed to Func withCheckedContinuation(isolation:function:_:)
@@ -130,18 +131,6 @@ Func withTaskGroup(of:returning:body:) has mangled name changing from '_Concurre
130131

131132
Func pthread_main_np() is a new API without '@available'
132133

133-
// Hashable for (Throwing)AsyncStream
134-
// These are just @usableFromInline:
135-
Var AsyncStream.Continuation.storage is a new API without '@available'
136-
Var AsyncThrowingStream.Continuation.storage is a new API without '@available'
137-
Class AsyncStream._Storage is a new API without '@available'
138-
Class AsyncThrowingStream._Storage is a new API without '@available'
139-
140-
// withTaskCancellationHandler now uses caller execution
141-
// Old methods are kept for ABI compatibility but this test does not understand that
142-
Func withTaskCancellationHandler(operation:onCancel:) has mangled name changing from '_Concurrency.withTaskCancellationHandler<A>(operation: () async throws -> A, onCancel: @Sendable () -> ()) async throws -> A' to '_Concurrency.withTaskCancellationHandler<A>(operation: nonisolated(nonsending) () async throws -> A, onCancel: @Sendable () -> ()) async throws -> A'
143-
Func withTaskCancellationHandler(operation:onCancel:) is now with @execution
144-
145134
// *** DO NOT DISABLE OR XFAIL THIS TEST. *** (See comment above.)
146135

147136

0 commit comments

Comments
 (0)