MCPcopy Create free account
hub / github.com/dmlc/parameter_server / RunWorker

Function RunWorker

src/util/threadpool.cc:20–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18}
19
20void RunWorker(void* data) {
21 ThreadPool* const thread_pool = reinterpret_cast<ThreadPool*>(data);
22 auto task = thread_pool->getNextTask();
23 while (task) {
24 task();
25 task = thread_pool->getNextTask();
26 }
27 thread_pool->stopOnFinalBarrier();
28}
29
30void ThreadPool::startWorkers() {
31 started_ = true;

Callers

nothing calls this directly

Calls 2

getNextTaskMethod · 0.80
stopOnFinalBarrierMethod · 0.80

Tested by

no test coverage detected