libcoro  1.0
Coroutine support library for C++20

◆ attach()

template<typename T >
void coro::future< T >::attach ( future< T > *  x)
inlineprotected

Attach future to internal linked list.

Futures can be chained into linked list. This allows to control this "internal" linked list. This function is added to support combining of promises

Parameters
xpointer to a future object which will be attached to the current future. If the current future already contains attached future, a new future is added to the end.

For better performance, always attach existing linked list to a new root

newitem->attach(list);
list = newitem;
Note
Function is not MT-Safe.

Definition at line 1218 of file future.h.