Async++ unknown
Async (co_await/co_return) code for C++
Loading...
Searching...
No Matches
asyncpp::task< T, Allocator > Class Template Reference

Generic task type. More...

#include <asyncpp/task.h>

Public Types

using promise_type = detail::task_promise<T, Allocator>
 Promise type.
 
using handle_t = coroutine_handle<promise_type>
 Handle type.
 

Public Member Functions

 task (handle_t hndl) noexcept
 Construct from handle.
 
 task (std::nullptr_t) noexcept
 Construct from nullptr. The resulting task is invalid.
 
 task (task &&other) noexcept
 Move constructor.
 
taskoperator= (task &&other) noexcept
 Move assignment.
 
 task (const task &)=delete
 
taskoperator= (const task &)=delete
 
 ~task ()
 Destructor.
 
 operator bool () const noexcept
 Check if the task holds a valid coroutine.
 
bool operator! () const noexcept
 Check if the task does not hold a valid coroutine.
 
auto operator co_await () noexcept
 Operator co_await.
 

Detailed Description

template<class T = void, ByteAllocator Allocator = default_allocator_type>
class asyncpp::task< T, Allocator >

Generic task type.

Template Parameters
TReturn type of the task

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