|
cxxmcp 1.1.6
C++ MCP SDK
|
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. | |
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.