12 lines
160 B
C++
12 lines
160 B
C++
void
|
|
thread_pool::run_pending_task()
|
|
{
|
|
function_wrapper task;
|
|
if (work_queue.try_pop(task)) {
|
|
task();
|
|
}
|
|
else {
|
|
std::this_thread::yield();
|
|
}
|
|
}
|