|
Aria 2.0.0
C++23 MVVM framework (C++20 minimum) — reactive, coroutine-first, ABI-layered
|
#include <qt_dispatcher.hpp>
Public Member Functions | |
| QtDispatcher (QObject *context=QCoreApplication::instance()) | |
| The context controls the owner thread and bounds task lifetime. | |
| ~QtDispatcher () override | |
| QtDispatcher (const QtDispatcher &)=delete | |
| QtDispatcher & | operator= (const QtDispatcher &)=delete |
| void | post (std::function< void()> callback) override |
| Schedule the callable to run on the main thread (asynchronously). | |
| void | post_delayed (std::chrono::milliseconds delay, std::function< void()> callback) override |
| Negative delays behave like post(). | |
| bool | is_main_thread () const noexcept override |
| Returns true if currently executing on the main thread. | |
| ::aria::SchedulerCaps | caps () const noexcept override |
| Capability bitmask. | |
| Public Member Functions inherited from aria::runtime::IDispatcher | |
| ~IDispatcher () override=default | |
| void | post_after (std::chrono::milliseconds delay, std::function< void()> fn) override |
| IDelayedScheduler adapter — routes to post_delayed. | |
| void | schedule (std::function< void()> fn) override |
| Submit fn for execution "soon". Defines Caps::Post. | |
| void | schedule_after (std::chrono::milliseconds delay, std::function< void()> fn) override |
| Submit fn for execution after delay. | |
| Public Member Functions inherited from aria::IDelayedScheduler | |
| ~IDelayedScheduler () override | |
| Public Member Functions inherited from aria::IScheduler | |
| virtual | ~IScheduler ()=default |
|
inlineexplicit |
The context controls the owner thread and bounds task lifetime.
An application object is the usual context. A null context or creation on another thread is rejected instead of silently losing posted work.
|
inlineoverride |
|
delete |
|
delete |
|
inlineoverridevirtual |
Schedule the callable to run on the main thread (asynchronously).
Implements aria::runtime::IDispatcher.
|
inlineoverridevirtual |
Negative delays behave like post().
Large delays are split into Qt timer intervals and checked against steady_clock, without narrowing the requested duration or overflowing an absolute clock deadline.
Implements aria::runtime::IDispatcher.
|
inlinenodiscardoverridevirtualnoexcept |
Returns true if currently executing on the main thread.
Implements aria::runtime::IDispatcher.
|
inlinenodiscardoverridevirtualnoexcept |
Capability bitmask.
Implementations should return a constant value (or at least a value stable across the object's lifetime).
Reimplemented from aria::runtime::IDispatcher.