Uni20
Asynchronous tensor and runtime library.
Loading...
Searching...
No Matches
Public Member Functions | List of all members
uni20::async::StorageAwaiter< T > Class Template Reference

Awaiter returning direct access to a writer's shared storage object. More...

#include <buffers.hpp>

Public Member Functions

bool await_ready () const noexcept
 Reports whether the writer epoch is immediately writable.
 
shared_storage< T > & await_resume ()
 Resume and return mutable access to shared storage.
 
void await_suspend (BasicTask &&t) noexcept
 Suspend until the writer epoch becomes writable.
 
std::shared_ptr< EpochContext > epoch_context_shared () const noexcept
 Returns the epoch context used for exception propagation.
 
 StorageAwaiter (EpochContextWriter< T > *writer)
 Construct from a non-owning writer pointer.
 

Detailed Description

template<typename T>
class uni20::async::StorageAwaiter< T >

Awaiter returning direct access to a writer's shared storage object.

Template Parameters
TStored value type.

Constructor & Destructor Documentation

◆ StorageAwaiter()

template<typename T >
uni20::async::StorageAwaiter< T >::StorageAwaiter ( EpochContextWriter< T > *  writer)
inline

Construct from a non-owning writer pointer.

Parameters
writerWriter handle owned by the parent WriteBuffer.

Member Function Documentation

◆ await_ready()

template<typename T >
bool uni20::async::StorageAwaiter< T >::await_ready ( ) const
inlinenoexcept

Reports whether the writer epoch is immediately writable.

Returns
true when no suspension is needed.

◆ await_resume()

template<typename T >
shared_storage< T > & uni20::async::StorageAwaiter< T >::await_resume ( )
inline

Resume and return mutable access to shared storage.

Returns
Reference to the writer storage.

◆ await_suspend()

template<typename T >
void uni20::async::StorageAwaiter< T >::await_suspend ( BasicTask &&  t)
inlinenoexcept

Suspend until the writer epoch becomes writable.

Parameters
tOwning task to suspend and enqueue.

◆ epoch_context_shared()

template<typename T >
std::shared_ptr< EpochContext > uni20::async::StorageAwaiter< T >::epoch_context_shared ( ) const
inlinenoexcept

Returns the epoch context used for exception propagation.

Returns
Shared pointer to the epoch context.

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