Skip to content

Commit 26f6aa6

Browse files
authored
Update TaskTimeout.swift
1 parent 8889884 commit 26f6aa6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Sources/TaskTimeout.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ public func withThrowingTimeout<T>(
4545
seconds: TimeInterval,
4646
body: () async throws -> sending T
4747
) async throws -> sending T {
48+
// body never leaves isolation, casts are used to keep compiler happy.
4849
let transferringBody = { try await Transferring(body()) }
4950
typealias NonSendableClosure = () async throws -> Transferring<T>
5051
typealias SendableClosure = @Sendable () async throws -> Transferring<T>

0 commit comments

Comments
 (0)