29 Async<T> const&
async() const noexcept {
return async_; }
45 requires std::constructible_from<T, U&&>
47 write_buf_.emplace_assert(std::forward<U>(v));
68 async_move(std::move(write_buf_), std::move(v));
86template <
typename T>
class Defer {
111 template <
typename U>
112 requires std::constructible_from<T, U&&>
115 writer_.emplace_assert(std::forward<U>(val));
121 template <
typename U>
122 requires std::assignable_from<T&, async_value_t<U>>
Awaitable capabilities for shared reads and exclusive mutable access to Async<T>.
Async<T> is a container for coroutine-safe asynchronous read/write.
Definition async/async.hpp:93
ReadBuffer< T > read() const
Begin an asynchronous read of the value.
Definition async/async.hpp:339
Move-only deferred writer helper for a single WriteBuffer<T>.
Definition future_value.hpp:86
T value_type
Definition future_value.hpp:88
void release()
Release the retained write buffer early.
Definition future_value.hpp:132
void write_assert(U &&val)
Write immediately without suspending — asserts write readiness.
Definition future_value.hpp:113
Defer(Async< T > &w)
Construct from an Async writer endpoint.
Definition future_value.hpp:104
Defer()=delete
No default construction.
WriteProxy< T > write()
Get the WriteBuffer for coroutine-based use.
Definition future_value.hpp:129
Defer & operator=(Defer &&)=delete
Non-move-assignable.
Defer(Defer &&)=default
Move constructor.
Defer & operator=(Defer const &)=delete
Non-copyable.
Defer(Defer const &)=delete
Non-copyable.
void operator=(U &&val)
Schedule assignment through the deferred writer.
Definition future_value.hpp:123
Defer(WriteBuffer< T > &&w)
Construct from an existing write buffer.
Definition future_value.hpp:108
Write-once async value wrapper that retains a pending write buffer.
Definition future_value.hpp:12
FutureValue & operator=(U &&v)
Assign a value immediately into the retained write buffer.
Definition future_value.hpp:44
FutureValue()
Construct a new, uninitialized FutureValue.
Definition future_value.hpp:17
ReadBuffer< T > read() const
Get a read buffer from the wrapped Async value.
Definition future_value.hpp:33
Async< T > & value()
Mutable access to the wrapped Async value.
Definition future_value.hpp:74
WriteBuffer< T > write() noexcept
Get the retained write buffer.
Definition future_value.hpp:37
FutureValue & operator=(Async< U > &&v)
Move-assign from another async source by scheduling an async move.
Definition future_value.hpp:66
Async< T > const & value() const
Const access to the wrapped Async value.
Definition future_value.hpp:77
FutureValue & operator=(Async< U > const &v)
Assign from another async source by scheduling an async copy.
Definition future_value.hpp:56
FutureValue(FutureValue &&) noexcept=default
Move constructor.
T value_type
Definition future_value.hpp:14
RAII handle for reading the value from an Async container at a given epoch.
Definition buffers.hpp:53
Assignment-only proxy returned by WriteBuffer::write().
Definition buffers.hpp:1720
Exclusive mutable-access buffer for one Async<T> epoch.
Definition buffers.hpp:859
void async_move(WriteBuffer< T > lhs, U &&rhs)
Definition async_ops.hpp:369
void async_assign(WriteBuffer< T > destination, U &&source)
Assign an awaitable value into an existing independent-value timeline.
Definition async_ops.hpp:310
This represents the reverse-mode adjoint for functions of complex variables, assuming a real-valued s...
Definition async/async.hpp:26
Defer< T > defer_write(Async< T > &a)
Create a deferred writer helper for an Async value.
Definition future_value.hpp:145
Async aliases for lazy tensor-level views.