Uni20
Asynchronous tensor and runtime library.
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Friends | List of all members
uni20::async::TaskHandle Class Reference

Non-owning erased identity for one Uni20 coroutine frame. More...

#include <async_task.hpp>

Public Member Functions

constexpr std::coroutine_handle coroutine () const noexcept
 
TaskDomain domain () const noexcept
 Return the execution domain declared by the concrete promise.
 
bool done () const noexcept
 
constexpr operator bool () const noexcept
 
TaskPromiseBase & promise () const noexcept
 
constexpr TaskHandle () noexcept=default
 

Static Public Member Functions

template<TaskPromise Promise>
static TaskHandle from (std::coroutine_handle< Promise > handle) noexcept
 

Friends

constexpr bool operator== (TaskHandle lhs, TaskHandle rhs) noexcept
 
class TaskPromiseBase
 

Detailed Description

Non-owning erased identity for one Uni20 coroutine frame.

The coroutine pointer, promise pointer, and concrete-promise domain are always captured together from the original typed coroutine handle. A TaskHandle does not add or release an ownership claim and never destroys a frame automatically.

Constructor & Destructor Documentation

◆ TaskHandle()

constexpr uni20::async::TaskHandle::TaskHandle ( )
constexprdefaultnoexcept

Member Function Documentation

◆ coroutine()

constexpr std::coroutine_handle uni20::async::TaskHandle::coroutine ( ) const
inlineconstexprnoexcept

◆ domain()

TaskDomain uni20::async::TaskHandle::domain ( ) const
inlinenoexcept

Return the execution domain declared by the concrete promise.

◆ done()

bool uni20::async::TaskHandle::done ( ) const
inlinenoexcept

◆ from()

template<TaskPromise Promise>
TaskHandle uni20::async::TaskHandle::from ( std::coroutine_handle< Promise >  handle)
staticnoexcept

◆ operator bool()

constexpr uni20::async::TaskHandle::operator bool ( ) const
inlineexplicitconstexprnoexcept

◆ promise()

TaskPromiseBase & uni20::async::TaskHandle::promise ( ) const
inlinenoexcept

Friends And Related Symbol Documentation

◆ operator==

constexpr bool operator== ( TaskHandle  lhs,
TaskHandle  rhs 
)
friend

◆ TaskPromiseBase

friend class TaskPromiseBase
friend

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