cxxmcp 1.1.6
C++ MCP SDK
Loading...
Searching...
No Matches
mcp::CancellationSource Class Reference

Owner side of a cooperative cancellation token. More...

#include <cancellation.hpp>

Public Member Functions

CancellationToken token () const noexcept
 Returns a token sharing this source's cancellation state.
 
void cancel () const noexcept
 Requests cancellation for all tokens created from this source.
 
bool cancelled () const noexcept
 Returns true when cancellation has been requested.
 

Detailed Description

Owner side of a cooperative cancellation token.

Member Function Documentation

◆ cancel()

void mcp::CancellationSource::cancel ( ) const
inlinenoexcept

Requests cancellation for all tokens created from this source.

Sets the atomic flag and notifies all threads blocked in wait_for_cancel().


The documentation for this class was generated from the following file: