Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Sources/ServiceLifecycle/GracefulShutdown.swift
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,12 @@ public func cancelWhenGracefulShutdown<T: Sendable>(_ operation: @Sendable @esca
/// Cancels the closure when a graceful shutdown was triggered.
///
/// - Parameter operation: The actual operation.
#if compiler(>=6.0)
@available(*, deprecated, renamed: "cancelWhenGracefulShutdown")
#else
// renamed pattern has been shown to cause compiler crashes in 5.x compilers.
@available(*, deprecated, message: "renamed to cancelWhenGracefulShutdown")
#endif
public func cancelOnGracefulShutdown<T: Sendable>(_ operation: @Sendable @escaping () async throws -> T) async rethrows -> T? {
return try await cancelWhenGracefulShutdown(operation)
}
Expand Down