|
Aria 2.0.0
C++23 MVVM framework (C++20 minimum) — reactive, coroutine-first, ABI-layered
|
#include <view_model_scope.hpp>
Public Member Functions | |
| ViewModelScope () | |
| ~ViewModelScope () | |
| ViewModelScope (const ViewModelScope &)=delete | |
| ViewModelScope & | operator= (const ViewModelScope &)=delete |
| ViewModelScope (ViewModelScope &&)=delete | |
| ViewModelScope & | operator= (ViewModelScope &&)=delete |
| void | attach (ViewModel &vm) |
| Tie this scope's lifetime to the ViewModel's destructor. | |
| async::CancellationToken | token () const noexcept |
| bool | is_cancelled () const noexcept |
| std::size_t | inflight_count () const noexcept |
| void | cancel () noexcept |
| Request cancellation only (non-blocking). | |
| bool | cancel_and_join (std::chrono::milliseconds timeout=kJoinTimeoutMs) noexcept |
| Cancel + synchronously wait for all in-flight coroutines to exit, with the given timeout. | |
| template<typename Fn> | |
| void | launch (Fn factory) |
| void | launch_simple (async::Task< void > task) |
Static Public Attributes | |
| static constexpr std::chrono::milliseconds | kJoinTimeoutMs {5000} |
| Default timeout for cancel_and_join() invoked from the VM's destroy-hook. | |
|
inline |
|
inline |
|
delete |
|
delete |
|
delete |
|
delete |
|
inline |
|
inlinenodiscardnoexcept |
|
inlinenodiscardnoexcept |
|
inlinenodiscardnoexcept |
|
inlinenoexcept |
Request cancellation only (non-blocking).
|
inlinenoexcept |
Cancel + synchronously wait for all in-flight coroutines to exit, with the given timeout.
Returns true on full drain.
|
inline |
|
inline |
|
staticconstexpr |
Default timeout for cancel_and_join() invoked from the VM's destroy-hook.
Matches the underlying CoroutineScope default and is generous enough for cooperatively-cancelled work; a stuck coroutine is reported as a leak rather than blocking process shutdown.