libcoro  1.0
Coroutine support library for C++20

◆ deliver() [2/2]

template<typename T , bool atomic>
template<std::invocable< function< prepared_coro()> > Fn>
void coro::promise< T, atomic >::notify::deliver ( Fn &&  fn)
inline

deliver notification through the function

Parameters
fnA function which receives another function which must be executed. You can for example pass the function to a thread pool for the execution. Return value of the function can be ignored. However it can carry a coroutine handle, you can use this value to improve scheduling. If the return value is ignored, the coroutine is resumed.

Definition at line 112 of file future.h.