Aria 2.0.0
C++23 MVVM framework (C++20 minimum) — reactive, coroutine-first, ABI-layered
Loading...
Searching...
No Matches
aria::IScheduler Class Referenceabstract

#include <scheduler.hpp>

Inheritance diagram for aria::IScheduler:
[legend]

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.

Constructor & Destructor Documentation

◆ ~IScheduler()

virtual aria::IScheduler::~IScheduler ( )
virtualdefault

Member Function Documentation

◆ caps()

virtual SchedulerCaps aria::IScheduler::caps ( ) const
nodiscardpure virtualnoexcept

◆ schedule()

virtual void aria::IScheduler::schedule ( std::function< void()> fn)
pure virtual

◆ schedule_after()

virtual void aria::IScheduler::schedule_after ( std::chrono::milliseconds delay,
std::function< void()> fn )
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.

◆ is_main_thread()

virtual bool aria::IScheduler::is_main_thread ( ) const
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.


The documentation for this class was generated from the following file: