libcoro  1.0
Coroutine support library for C++20

◆ operator+=()

template<typename T , bool atomic>
template<bool f>
promise& coro::promise< T, atomic >::operator+= ( promise< T, f > &  other)
inline

Combine two promises into one.

Two promises are combined into one and they can be fulfilled together by single call operation. Requires T copy constructible. There is no reverse operation

Parameters
otherother promise which is attached
Note
result is current promise controls also attached promise. You can attach unlimited count of promises into one.
order of processing of such promise is not defined - can be random.

Definition at line 304 of file future.h.