A shared, mutable cancellation flag for one in-flight request. The server
hands the same token to the request's RequestContext (so the handler can
poll ctx.isCancelled) and to its in-flight registry (so an inbound
notifications/cancelled for the matching request id can flip it). It is a
class so the flag is observed across the two tasks that a Streamable HTTP
transport runs the request and its cancellation on. See
basic/utilities/cancellation: a receiver "SHOULD: Stop processing the
cancelled request, Free associated resources, Not send a response".
A shared, mutable cancellation flag for one in-flight request. The server hands the same token to the request's RequestContext (so the handler can poll ctx.isCancelled) and to its in-flight registry (so an inbound notifications/cancelled for the matching request id can flip it). It is a class so the flag is observed across the two tasks that a Streamable HTTP transport runs the request and its cancellation on. See basic/utilities/cancellation: a receiver "SHOULD: Stop processing the cancelled request, Free associated resources, Not send a response".