221 std::shared_ptr<Impl> impl_;
Copyable type-erased callable analogue of std::function with a tunable SBO and pool spill.
Definition: functional.h:131
O(1) hashed-timing-wheel scheduler backed by an internal worker thread.
Definition: wheel_timer.h:98
void start()
Starts the worker thread and begins advancing the wheel cursor.
bool is_running() const
Reports whether the wheel is currently running.
Key add(uint32_t timeout_ms, Callback &&callback, uint32_t repeat_ms=0)
Inserts a new timer into the wheel.
void stop()
Stops the wheel and joins the worker thread.
~WheelTimer()
Destructor. Calls stop() when the wheel is still running.
WheelTimer(uint32_t slots, uint32_t interval_ms)
Constructs the wheel with the given resolution and capacity.
void wakeup()
Wakes the worker thread early when it is sleeping between ticks.
uint32_t get_remaining_time(Key key) const
Returns the approximate remaining time before a timer fires.
void resume()
Resumes a paused wheel; a no-op when not paused.
void pause()
Temporarily suspends timer dispatch without joining the worker thread.
bool remove(Key key)
Removes a timer before its callback runs.
void set_catchup_limit(uint32_t max_slots_to_catch_up)
Caps the number of catch-up slots processed in a single tick iteration.
Pool-backed type-erased callables: copyable vlink::Function and move-only vlink::MoveFunction.
Cross-platform macros for visibility, branch hints, copy prevention, singletons and string helpers.
#define VLINK_EXPORT
Definition: macros.h:81
#define VLINK_DISALLOW_COPY_AND_ASSIGN(classname)
Deletes the copy constructor and copy-assignment operator of classname.
Definition: macros.h:174
Definition: point_cloud.h:195