Zth (libzth)
Loading...
Searching...
No Matches
zth::coro::task_promise< T > Class Template Reference

#include <coro.h>

Inheritance diagram for zth::coro::task_promise< T >:
zth::coro::task_promise_base< T > zth::coro::promise< task_promise< T > > zth::coro::promise_base zth::RefCounted zth::UniqueID< promise_base > zth::NamedUniqueID< Named > zth::UniqueIDBase

Public Types

using base = task_promise_base< T >
 
using Future_type = Future< return_type >
 
using return_type = T
 
- Public Types inherited from zth::coro::task_promise_base< T >
using return_type = T
 
using base = promise< task_promise< return_type > >
 
using Future_type = Future< return_type >
 
using task_type = task< return_type >
 
using promise_type = Promise
 
- Public Types inherited from zth::coro::promise< task_promise< T > >
using promise_type = task_promise< T >
 
- Public Types inherited from zth::UniqueID< promise_base >
typedef NamedUniqueID base
 

Public Member Functions

virtual ~task_promise () noexcept override=default
 
template<typename T_ >
void return_value (T_ &&v) noexcept
 
- Public Member Functions inherited from zth::coro::task_promise_base< T >
 task_promise_base ()
 
virtual ~task_promise_base () noexcept override=default
 
Future_typefuture () noexcept
 
bool completed () const noexcept
 
auto get_return_object () noexcept
 
void unhandled_exception () noexcept
 
- Public Member Functions inherited from zth::coro::promise< task_promise< T > >
virtual ~promise () noexcept override
 
auto typedHandle () noexcept
 
virtual std::coroutine_handle handle () noexcept final
 
decltype(auto) initial_suspend () noexcept
 
decltype(auto) final_suspend () noexcept
 
decltype(auto) await_transform (A &&a) noexcept
 
virtual bool running () const noexcept final
 
void run ()
 
- Public Member Functions inherited from zth::coro::promise_base
 ZTH_MALLOC_ATTR ((malloc, alloc_size(1))) static void *operator new(std
 
virtual ~promise_base () noexcept override=default
 
std::coroutine_handle continuation () noexcept
 
bool has_continuation () const noexcept
 
void set_continuation (std::coroutine_handle<> cont={}) noexcept
 
- Public Member Functions inherited from zth::RefCounted
 RefCounted () noexcept
 
virtual ~RefCounted () noexcept
 
void used () noexcept
 
bool unused () noexcept
 
size_t refs () const noexcept
 
- Public Member Functions inherited from zth::UniqueID< promise_base >
 UniqueID (UniqueID const &)=delete
 
 UniqueID (UniqueID &&u) noexcept
 
 UniqueID (string const &name)
 
 UniqueID (string &&name)
 
 UniqueID (char const *name=nullptr)
 
UniqueIDoperator= (UniqueID const &)=delete
 
UniqueIDoperator= (UniqueID &&u) noexcept
 
virtual ~UniqueID () noexcept override=default
 
void const * normptr () const noexcept
 
uint64_t id () const noexcept
 
- Public Member Functions inherited from zth::NamedUniqueID< Named >
virtual ~NamedUniqueID () noexcept override=default
 
string const & name () const noexcept
 
void setName (string const &name)
 
void setName (char const *name)
 
void setName (string &&name)
 
virtual char const * id_str () const noexcept override
 

Additional Inherited Members

- Static Public Member Functions inherited from zth::coro::promise_base
static ZTH_MALLOC_INLINE void operator delete (void *ptr, std::size_t n) noexcept
 
- Static Public Member Functions inherited from zth::UniqueID< promise_base >
static uint64_t getID () noexcept
 
- Protected Member Functions inherited from zth::coro::promise< task_promise< T > >
 promise (cow_string const &name)
 
void running (bool set) noexcept
 
promise_type const & self () const noexcept
 
promise_typeself () noexcept
 
- Protected Member Functions inherited from zth::coro::promise_base
 promise_base (cow_string const &name)
 
- Protected Member Functions inherited from zth::UniqueID< promise_base >
virtual uint64_t id_ () const noexcept final
 
- Protected Member Functions inherited from zth::NamedUniqueID< Named >
 NamedUniqueID (char const *name=nullptr)
 
 NamedUniqueID (string const &name)
 
 NamedUniqueID (string &&name)
 
- Protected Member Functions inherited from zth::UniqueIDBase
virtual ~UniqueIDBase () noexcept=default
 

Detailed Description

template<typename T>
class zth::coro::task_promise< T >

Definition at line 672 of file coro.h.

Member Typedef Documentation

◆ base

template<typename T >
using zth::coro::task_promise< T >::base = task_promise_base<T>

Definition at line 674 of file coro.h.

◆ Future_type

template<typename T >
using zth::coro::task_promise_base< T >::Future_type = Future<return_type>

Definition at line 636 of file coro.h.

◆ return_type

template<typename T >
using zth::coro::task_promise_base< T >::return_type = T

Definition at line 633 of file coro.h.

Constructor & Destructor Documentation

◆ ~task_promise()

template<typename T >
virtual zth::coro::task_promise< T >::~task_promise ( )
overridevirtualdefaultnoexcept

Member Function Documentation

◆ return_value()

template<typename T >
template<typename T_ >
void zth::coro::task_promise< T >::return_value ( T_ &&  v)
inlinenoexcept

Definition at line 681 of file coro.h.


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