handoffReply(to:_:)
Informs the system when message processing and response continues in a separate dispatch queue.
Declaration
@preconcurrency func handoffReply(to queue: DispatchQueue, _ continuation: @escaping @Sendable () -> Void) -> (any Encodable)?Parameters
- queue:
The dispatch queue where message processing continues. The queue must be an immutible queue hierarchy.
- continuation:
The closure to perform on
queue.
Return Value
This method always returns nil, allowing a message handler closure to return a value.
Discussion
You can only call this method from the context of a message handler closure, or from a continuation closure passed to handoffReply(to:_:).