Skip to content

Commit

Permalink
Fix Sendable closure annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
Supereg committed Jul 11, 2024
1 parent b10e3f2 commit 77cc3da
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Sources/SpeziFoundation/Misc/TimeoutError.swift
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ extension TimeoutError: LocalizedError {
/// - Parameters:
/// - timeout: The duration of the timeout.
/// - action: The action to run once the timeout passed.
public func withTimeout(of timeout: Duration, perform action: () async -> Void) async {
@inlinable
public func withTimeout(of timeout: Duration, perform action: @Sendable () async -> Void) async {
try? await Task.sleep(for: timeout)
guard !Task.isCancelled else {
return
Expand Down

0 comments on commit 77cc3da

Please sign in to comment.