Aria 2.0.0
C++23 MVVM framework (C++20 minimum) — reactive, coroutine-first, ABI-layered
Loading...
Searching...
No Matches
async_command_builder.hpp File Reference
#include "aria/async/async_command.hpp"
#include "aria/async/cancellation.hpp"
#include "aria/async/retry.hpp"
#include "aria/async/task.hpp"
#include "aria/async/timeout.hpp"
#include "aria/async/virtual_time_executor.hpp"
#include <chrono>
#include <exception>
#include <functional>
#include <type_traits>
#include <utility>
Include dependency graph for async_command_builder.hpp:

Go to the source code of this file.

Namespaces

namespace  aria
namespace  aria::async

Functions

template<typename R, typename... Args, typename Fn>
auto aria::async::action_with_timeout (IDelayedScheduler &timer, std::chrono::milliseconds duration, Fn factory) -> std::function< Task< R >(CancellationToken, Args...)>
 Wrap an AsyncCommand action factory with a per-invocation timeout.
template<typename R, typename... Args, typename Fn>
auto aria::async::action_with_retry (int max_attempts, std::chrono::milliseconds initial_backoff, IDelayedScheduler &timer, Fn factory, std::function< bool(const std::exception &)> should_retry=nullptr) -> std::function< Task< R >(CancellationToken, Args...)>
 Wrap an AsyncCommand action with retry + exponential backoff.