libcoro  1.0
Coroutine support library for C++20

◆ start() [2/2]

template<typename CondVar >
template<std::invocable< notify_t > ResumeCB>
bool coro::scheduler_t< CondVar >::start ( ResumeCB &&  resumecb)
inline

Start scheduler at background.

The scheduler starts a thread, which performs scheduling. You can start only one thread per scheduler's instance

Parameters
resumecbcallback function which is responsible to resume expired items. This argument is optional. You can specify own function, or you can use coro::scheduler::thread_pool() function to connect a thread pool for this feature. If not specified, expired items are resumed in the scheduler's thread
Return values
truestarted
falsealready runnning

Definition at line 196 of file scheduler.h.