AUI Framework
master
Cross-platform module-based framework for developing C++20 desktop applications
|
Basic scheduler used for timers. More...
Basic scheduler used for timers.
Public Types | |
using | TimerHandle = _weak< Timer > |
Public Member Functions | |
bool | iteration (ABitField< ASchedulerIteration > flag=ASchedulerIteration::NONE) |
Performs an iteration. More... | |
void | notifyProcessMessages () override |
Notifies this IEventLoop that its thread got a new message to process. More... | |
void | loop () override |
Do message processing loop. More... | |
template<typename Duration > | |
void | enqueue (Duration timeout, std::function< void()> callback) |
template<typename Duration > | |
TimerHandle | timer (Duration timeout, std::function< void()> callback) |
Creates a timer. More... | |
void | removeTimer (const TimerHandle &t) |
bool | emptyTasks () const noexcept |
void | stop () |
bool AScheduler::iteration | ( | ABitField< ASchedulerIteration > | flag = ASchedulerIteration::NONE | ) |
Performs an iteration.
flag | flags for the iteration. See ASchedulerIteration for more info. |
|
overridevirtual |
Do message processing loop.
Implements IEventLoop.
|
overridevirtual |
Notifies this IEventLoop that its thread got a new message to process.
Implements IEventLoop.
|
inline |
Creates a timer.
timeout | timeout (i.e. 500ms) |
callback | callback to be called |
Creates a timer with the specified callback. The callback is not called immediately during timer creation.
#include <AUI/Util/AScheduler.h>