|
Aria 2.0.0
C++23 MVVM framework (C++20 minimum) — reactive, coroutine-first, ABI-layered
|
#include <scheduler.hpp>
Public Member Functions | |
| virtual | ~IScheduler ()=default |
| virtual SchedulerCaps | caps () const noexcept=0 |
| Capability bitmask. | |
| virtual void | schedule (std::function< void()> fn)=0 |
| Submit fn for execution "soon". Defines Caps::Post. | |
| virtual void | schedule_after (std::chrono::milliseconds delay, std::function< void()> fn) |
| Submit fn for execution after delay. | |
| virtual bool | is_main_thread () const noexcept |
| True iff the calling thread is the scheduler's "main" thread. | |
|
virtualdefault |
|
nodiscardpure virtualnoexcept |
Capability bitmask.
Implementations should return a constant value (or at least a value stable across the object's lifetime).
Implemented in aria::adapters::qt6::QtDispatcher, aria::async::IExecutor, aria::async::InlineExecutor, aria::async::MainThreadExecutor, aria::async::ThreadPoolExecutor, aria::async::VirtualTimeExecutor, aria::IDelayedScheduler, aria::runtime::DispatcherExecutor, aria::runtime::DispatcherScheduler, and aria::runtime::IDispatcher.
|
pure virtual |
Submit fn for execution "soon". Defines Caps::Post.
Implemented in aria::async::IExecutor, aria::async::VirtualTimeExecutor, aria::IDelayedScheduler, aria::runtime::DispatcherScheduler, and aria::runtime::IDispatcher.
|
inlinevirtual |
Submit fn for execution after delay.
Default implementation throws unsupported_capability; implementations that advertise Caps::Delay MUST override.
Reimplemented in aria::async::VirtualTimeExecutor, aria::IDelayedScheduler, aria::runtime::DispatcherScheduler, and aria::runtime::IDispatcher.
|
inlinenodiscardvirtualnoexcept |
True iff the calling thread is the scheduler's "main" thread.
Default returns false; implementations advertising Caps::MainThread SHOULD override with a meaningful answer.
Reimplemented in aria::adapters::qt6::QtDispatcher, aria::async::MainThreadExecutor, aria::runtime::DispatcherExecutor, aria::runtime::DispatcherScheduler, aria::runtime::IDispatcher, and aria::runtime::SimpleDispatcher.