We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8889884 commit 26f6aa6Copy full SHA for 26f6aa6
Sources/TaskTimeout.swift
@@ -45,6 +45,7 @@ public func withThrowingTimeout<T>(
45
seconds: TimeInterval,
46
body: () async throws -> sending T
47
) async throws -> sending T {
48
+ // body never leaves isolation, casts are used to keep compiler happy.
49
let transferringBody = { try await Transferring(body()) }
50
typealias NonSendableClosure = () async throws -> Transferring<T>
51
typealias SendableClosure = @Sendable () async throws -> Transferring<T>
0 commit comments