|
Aria 2.0.0
C++23 MVVM framework (C++20 minimum) — reactive, coroutine-first, ABI-layered
|
Thread pool executor. More...
#include <executor.hpp>
Public Member Functions | |
| ThreadPoolExecutor (std::size_t threads=std::thread::hardware_concurrency()) | |
| ~ThreadPoolExecutor () override | |
| void | post (std::function< void()> fn) override |
| Legacy / canonical executor entry point. | |
| aria::SchedulerCaps | caps () const noexcept override |
| Worker pool: NOT safe as the graph executor. | |
| std::size_t | worker_count () const noexcept |
| void | wait_idle () |
| Block until queue is drained AND no worker is currently running a task. | |
| Public Member Functions inherited from aria::async::IExecutor | |
| ~IExecutor () override=default | |
| 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. | |
Thread pool executor.
|
inlineexplicit |
|
inlineoverride |
|
inlineoverridevirtual |
Legacy / canonical executor entry point.
Implementations override this; the unified IScheduler::schedule(fn) is wired to it.
Implements aria::async::IExecutor.
|
inlinenodiscardoverridevirtualnoexcept |
Worker pool: NOT safe as the graph executor.
Property writes from a pool thread would race the reactive graph's owner-thread invariant. Caps advertise Post + WorkerSafe + Autonomous (no pump required); GraphSafe is explicitly absent.
Reimplemented from aria::async::IExecutor.
|
inlinenodiscardnoexcept |
|
inline |
Block until queue is drained AND no worker is currently running a task.
Uses a condition variable rather than a bounded spin-sleep so long tasks don't race the destructor.