ServerCancellationManager
Stores cancellation state for an RPC on the server .
final class ServerCancellationManager
Stores cancellation state for an RPC on the server .
final class ServerCancellationManager
import GRPCCore
A gRPC library for Swift written natively in Swift.
protocol Sendable
init()
var isRPCCancelled: Bool { get }
Returns whether the RPC has been marked as cancelled.
func addRPCCancelledHandler(_ handler: @escaping () -> Void) -> UInt64?
Adds a handler which is invoked when the RPC is cancelled.
func cancelRPC()
Marks the RPC as cancelled, potentially running any cancellation handlers.
func removeRPCCancelledHandler(withID id: UInt64)
Removes a handler by its ID.
func suspendUntilRPCIsCancelled() async throws(CancellationError)
Suspends until the RPC is cancelled or the Task
is cancelled.