|
esphome-api-client 0.5.0
Modern C++17 client for the ESPHome native API (plaintext + Noise)
|
Minimal executor: deferred execution plus one-shot timers. More...
#include <executor.hpp>
Public Member Functions | |
| virtual | ~Executor ()=default |
| virtual void | post (std::function< void()> fn)=0 |
Run fn soon, on the executor (never inline / re-entrantly). | |
| virtual TimerId | schedule_after (std::chrono::milliseconds delay, std::function< void()> fn)=0 |
Run fn once after delay. Returns a handle usable with cancel. | |
| virtual void | cancel (TimerId id)=0 |
| Cancel a pending timer (no-op if it already fired or was cancelled). | |
Minimal executor: deferred execution plus one-shot timers.
Everything the connection does is funnelled through here so it can run on a real io_context, a strand, or a deterministic test clock.
|
virtualdefault |
|
pure virtual |
Cancel a pending timer (no-op if it already fired or was cancelled).
|
pure virtual |
Run fn soon, on the executor (never inline / re-entrantly).
|
pure virtual |
Run fn once after delay. Returns a handle usable with cancel.