In-process dispatcher: runs queued callables when pump() is invoked (typically from your main loop).
More...
#include <dispatcher.hpp>
In-process dispatcher: runs queued callables when pump() is invoked (typically from your main loop).
Suitable for console apps and tests.
◆ SimpleDispatcher() [1/3]
| aria::runtime::SimpleDispatcher::SimpleDispatcher |
( |
| ) |
|
◆ ~SimpleDispatcher()
| aria::runtime::SimpleDispatcher::~SimpleDispatcher |
( |
| ) |
|
|
override |
◆ SimpleDispatcher() [2/3]
| aria::runtime::SimpleDispatcher::SimpleDispatcher |
( |
const SimpleDispatcher & | | ) |
|
|
delete |
◆ SimpleDispatcher() [3/3]
| aria::runtime::SimpleDispatcher::SimpleDispatcher |
( |
SimpleDispatcher && | | ) |
|
|
delete |
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ post()
| void aria::runtime::SimpleDispatcher::post |
( |
std::function< void()> | fn | ) |
|
|
overridevirtual |
◆ post_delayed()
| void aria::runtime::SimpleDispatcher::post_delayed |
( |
std::chrono::milliseconds | delay, |
|
|
std::function< void()> | fn ) |
|
overridevirtual |
◆ is_main_thread()
| bool aria::runtime::SimpleDispatcher::is_main_thread |
( |
| ) |
const |
|
nodiscardoverridevirtualnoexcept |
◆ pump()
| std::size_t aria::runtime::SimpleDispatcher::pump |
( |
std::chrono::milliseconds | budget = std::chrono::milliseconds{50} | ) |
|
Pump pending callables on the creating thread.
Returns the number processed. Throws std::logic_error when called from another thread.
◆ run_one()
| void aria::runtime::SimpleDispatcher::run_one |
( |
| ) |
|
Block on the creating thread until one callable is available, then run it.
Throws std::logic_error when called from another thread.
The documentation for this class was generated from the following file: