mrs_lib
Various reusable classes, functions and utilities for use in MRS projects
Loading...
Searching...
No Matches
mrs_lib::Task< T > Class Template Reference

Task type for creating coroutines. More...

#include <task.hpp>

Public Types

using promise_type = internal::PromiseType< T >
 

Public Member Functions

 Task (const Task &)=delete
 
Taskoperator= (const Task &)=delete
 
 Task (Task &&)=delete
 
Taskoperator= (Task &&)=delete
 

Friends

class internal::PromiseType< T >
 
internal::TaskAwaitable< T > operator co_await (Task task)
 

Detailed Description

template<typename T>
requires (std::same_as<T, std::remove_cvref_t<T>>)
class mrs_lib::Task< T >

Task type for creating coroutines.

Template Parameters
TReturn type of the coroutine (default is void)

Task is lazy coroutine, which means it must be co_awaited to start executing.


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