libcoro  1.0
Coroutine support library for C++20
Public Member Functions | Friends | List of all members
coro::task_list< T > Class Template Reference

helps to create task list: list of started task as list of futures More...

#include <future_list.h>

Inherits std::deque< T >.

Public Member Functions

template<std::invocable Fn>
void operator<< (Fn &&fn)
 Redirect return value to the task list. More...
 
template<typename X , typename Y >
requires std::constructible_from< T, async< X, Y > > void push_back (async< X, Y > x)
 Start async function and store result to the list (as last item) More...
 
template<typename X , typename Y >
requires std::constructible_from< T, async< X, Y > > void push_front (async< X, Y > x)
 Start async function and store result to the list (as first item) More...
 

Friends

template<std::invocable Fn>
void operator>> (Fn &&fn, task_list &lst)
 Redirect return value to the task list. More...
 

Detailed Description

template<typename T>
class coro::task_list< T >

helps to create task list: list of started task as list of futures

Template Parameters
Tcan be coro::future<T>, coro::deferred_future<T> or any awaitable compatible with these objects. T can be unmovable, however you need to use special push operations in this case.

Definition at line 438 of file future_list.h.


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