@@ -58,6 +58,9 @@ public func withGracefulShutdownHandler<T>(
5858 return try await operation ( )
5959}
6060
61+ /// Execute an operation with a graceful shutdown handler that’s immediately invoked if the current task is shutting down gracefully.
62+ ///
63+ /// Use ``withGracefulShutdownHandler(isolation:operation:onGracefulShutdown:)`` instead.
6164@available ( * , deprecated, message: " Use the method with the isolation parameter instead. " )
6265@available ( macOS 10 . 15 , iOS 13 . 0 , watchOS 6 . 0 , tvOS 13 . 0 , * )
6366@_disfavoredOverload
@@ -142,6 +145,11 @@ public func withTaskCancellationOrGracefulShutdownHandler<T>(
142145 handler ( )
143146 }
144147}
148+
149+ /// Execute an operation with a graceful shutdown or task cancellation handler that’s immediately invoked if the current task is
150+ /// shutting down gracefully or has been cancelled.
151+ ///
152+ /// Use ``withTaskCancellationOrGracefulShutdownHandler(isolation:operation:onCancelOrGracefulShutdown:)`` instead.
145153@available ( * , deprecated, message: " Use the method with the isolation parameter instead. " )
146154@available ( macOS 10 . 15 , iOS 13 . 0 , watchOS 6 . 0 , tvOS 13 . 0 , * )
147155@_disfavoredOverload
@@ -156,6 +164,10 @@ public func withTaskCancellationOrGracefulShutdownHandler<T>(
156164 }
157165}
158166#else
167+ /// Execute an operation with a graceful shutdown or task cancellation handler that’s immediately invoked if the current task is
168+ /// shutting down gracefully or has been cancelled.
169+ ///
170+ /// Use ``withTaskCancellationOrGracefulShutdownHandler(isolation:operation:onCancelOrGracefulShutdown:)`` instead.
159171@available ( * , deprecated, message: " Use the method with the isolation parameter instead. " )
160172@available ( macOS 10 . 15 , iOS 13 . 0 , watchOS 6 . 0 , tvOS 13 . 0 , * )
161173@_disfavoredOverload
@@ -244,6 +256,7 @@ public func cancelWhenGracefulShutdown<T: Sendable>(
244256
245257/// Cancels the closure when a graceful shutdown was triggered.
246258///
259+ /// Use ``cancelWhenGracefulShutdown(_:)`` instead.
247260/// - Parameter operation: The actual operation.
248261#if compiler(>=6.0)
249262@available ( * , deprecated, renamed: " cancelWhenGracefulShutdown " )
0 commit comments