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

Handle to a scheduled timer that can be cancelled before it fires. More...

#include <timer_handle.hpp>

Public Member Functions

 TimerHandle (std::shared_ptr< TimerEntry > entry)
 
bool valid () const noexcept
 Returns true if this handle references a valid timer entry.
 
void cancel ()
 Cancels the timer. The associated task will not execute.
 
bool cancelled () const noexcept
 Returns true if the timer has been cancelled.
 

Detailed Description

Handle to a scheduled timer that can be cancelled before it fires.

The handle shares ownership of the underlying timer entry. Cancelling the handle prevents the task from executing but does not remove it from the executor's timer heap; the executor skips cancelled entries during dispatch.


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