MCPcopy Create free account
hub / github.com/baidu/tera / AddTask

Method AddTask

src/common/thread_pool.h:83–88  ·  view source on GitHub ↗

Add a task to the thread pool.

Source from the content-addressed store, hash-verified

81
82 // Add a task to the thread pool.
83 void AddTask(const Task& task) {
84 MutexLock lock(&mutex_, "AddTask");
85 queue_.push_back(BGItem(0, get_micros(), task));
86 ++pending_num_;
87 work_cv_.Signal();
88 }
89 void AddPriorityTask(const Task& task) {
90 MutexLock lock(&mutex_);
91 queue_.push_front(BGItem(0, get_micros(), task));

Callers 15

SharedTableImplTestFunction · 0.80
CompactOpFunction · 0.80
AllDiffFunction · 0.80
SendMessageWithRetryMethod · 0.80
RpcCallbackMethod · 0.80
CmdCtrlMethod · 0.80
PushToInsertQueueMethod · 0.80
PushToInsertQueueMethod · 0.80
TEST_FFunction · 0.80
AsyncGetCellMethod · 0.80
CommitMethod · 0.80

Calls 4

push_backMethod · 0.80
BGItemClass · 0.70
get_microsFunction · 0.70
SignalMethod · 0.45

Tested by 8

SharedTableImplTestFunction · 0.64
TEST_FFunction · 0.64
RunTestMethod · 0.64
TEST_FFunction · 0.64
TEST_FFunction · 0.64
TESTFunction · 0.64
TESTFunction · 0.64
ObserveTestMethod · 0.64