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

Awaiter that yields an owning storage-access proxy. More...

#include <buffers.hpp>

Public Types

using value_type = shared_storage< T >
 

Public Member Functions

bool await_ready () const noexcept
 Reports whether the writer epoch is immediately writable.
 
OwningStorageAccessProxy< T > await_resume ()
 Resume and transfer writer ownership to a storage proxy.
 
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.
 
 OwningStorageAwaiter (EpochContextWriter< T > &&writer)
 Construct from an owning writer.
 

Detailed Description

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

Awaiter that yields an owning storage-access proxy.

Template Parameters
TStored value type.

Member Typedef Documentation

◆ value_type

template<typename T >
using uni20::async::OwningStorageAwaiter< T >::value_type = shared_storage<T>

Constructor & Destructor Documentation

◆ OwningStorageAwaiter()

template<typename T >
uni20::async::OwningStorageAwaiter< T >::OwningStorageAwaiter ( EpochContextWriter< T > &&  writer)
inlineexplicit

Construct from an owning writer.

Parameters
writerWriter handle transferred into this awaiter.

Member Function Documentation

◆ await_ready()

template<typename T >
bool uni20::async::OwningStorageAwaiter< 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 >
OwningStorageAccessProxy< T > uni20::async::OwningStorageAwaiter< T >::await_resume ( )
inline

Resume and transfer writer ownership to a storage proxy.

Returns
Owning storage access proxy.

◆ await_suspend()

template<typename T >
void uni20::async::OwningStorageAwaiter< 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::OwningStorageAwaiter< 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: