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

#include <coro.h>

Inheritance diagram for 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 zth::coro::task_promise< T >

Public Types

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

 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_base< T >

Definition at line 631 of file coro.h.

Member Typedef Documentation

◆ base

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

Definition at line 634 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.

◆ promise_type

template<typename T >
using zth::coro::promise< Promise >::promise_type = Promise

Definition at line 315 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.

◆ task_type

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

Definition at line 637 of file coro.h.

Constructor & Destructor Documentation

◆ task_promise_base()

template<typename T >
zth::coro::task_promise_base< T >::task_promise_base ( )
inline

Definition at line 639 of file coro.h.

◆ ~task_promise_base()

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

Member Function Documentation

◆ completed()

template<typename T >
bool zth::coro::task_promise_base< T >::completed ( ) const
inlinenoexcept

Definition at line 650 of file coro.h.

◆ future()

template<typename T >
Future_type & zth::coro::task_promise_base< T >::future ( )
inlinenoexcept

Definition at line 645 of file coro.h.

◆ get_return_object()

template<typename T >
auto zth::coro::task_promise_base< T >::get_return_object ( )
inlinenoexcept

Definition at line 655 of file coro.h.

◆ unhandled_exception()

template<typename T >
void zth::coro::task_promise_base< T >::unhandled_exception ( )
inlinenoexcept

Definition at line 661 of file coro.h.


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