MCPcopy Create free account
hub / github.com/Audio4Linux/JDSP4Linux / try_run_one_task

Method try_run_one_task

3rdparty/asyncplusplus/src/scheduler.cpp:207–219  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

205 impl->queue.push(std::move(t));
206}
207bool fifo_scheduler::try_run_one_task()
208{
209 task_run_handle t;
210 {
211 std::lock_guard<std::mutex> locked(impl->lock);
212 t = impl->queue.pop();
213 }
214 if (t) {
215 t.run();
216 return true;
217 }
218 return false;
219}
220void fifo_scheduler::run_all_tasks()
221{
222 while (try_run_one_task()) {}

Callers

nothing calls this directly

Calls 2

popMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected