|
Aria 2.0.0
C++23 MVVM framework (C++20 minimum) — reactive, coroutine-first, ABI-layered
|
Abstract executor interface — schedules a callable to run "somewhere". More...
#include <executor.hpp>
Public Member Functions | |
| ~IExecutor () override=default | |
| virtual void | post (std::function< void()> fn)=0 |
| Legacy / canonical executor entry point. | |
| aria::SchedulerCaps | caps () const noexcept override |
| Capability bitmask. | |
| void | schedule (std::function< void()> fn) override |
| Submit fn for execution "soon". Defines Caps::Post. | |
| virtual bool | is_safe_graph_executor () const noexcept |
| True iff this executor is safe to use as the graph-thread (UI) executor. | |
| virtual bool | is_safe_worker_executor () const noexcept |
| True iff this executor can host worker tasks. | |
| Public Member Functions inherited from aria::IScheduler | |
| virtual | ~IScheduler ()=default |
| 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. | |
Abstract executor interface — schedules a callable to run "somewhere".
Inherits virtually from aria::IScheduler so that role/capability introspection is uniform across all schedulers in the framework (executors, dispatchers, timers). The legacy two-bool capability surface (is_safe_graph_executor() / is_safe_worker_executor()) is preserved as thin views over caps() so existing IExecutor subclasses keep compiling unchanged; a built-in executor that wants to override capabilities should prefer overriding caps().
The default capability set is Post | GraphSafe | WorkerSafe, matching the historical "permissive" defaults. Specific built-in executors override caps() to drop a flag they cannot uphold (e.g. ThreadPoolExecutor drops GraphSafe).
|
overridedefault |
|
pure virtual |
Legacy / canonical executor entry point.
Implementations override this; the unified IScheduler::schedule(fn) is wired to it.
Implemented in aria::async::InlineExecutor, aria::async::MainThreadExecutor, aria::async::ThreadPoolExecutor, aria::async::VirtualTimeExecutor, and aria::runtime::DispatcherExecutor.
|
inlinenodiscardoverridevirtualnoexcept |
Capability bitmask.
Implementations should return a constant value (or at least a value stable across the object's lifetime).
Implements aria::IScheduler.
Reimplemented in aria::async::InlineExecutor, aria::async::MainThreadExecutor, aria::async::ThreadPoolExecutor, and aria::async::VirtualTimeExecutor.
|
inlineoverridevirtual |
Submit fn for execution "soon". Defines Caps::Post.
Implements aria::IScheduler.
Reimplemented in aria::async::VirtualTimeExecutor.
|
inlinenodiscardvirtualnoexcept |
|
inlinenodiscardvirtualnoexcept |