MCPcopy Create free account
hub / github.com/4paradigm/OpenMLDB / Stop

Method Stop

src/base/taskpool.hpp:48–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46 }
47
48 bool Stop() {
49 {
50 std::unique_lock<std::mutex> lock(mutex_);
51 stop_ = true;
52 work_cv_.notify_all();
53 queue_cv_.notify_all();
54 }
55 for (uint32_t i = 0; i < tids_.size(); i++) {
56 pthread_join(tids_[i], NULL);
57 }
58 tids_.clear();
59 return true;
60 }
61
62 void AddTask(const Task& task) {
63 std::unique_lock<std::mutex> lock(mutex_);

Callers

nothing calls this directly

Calls 2

clearMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected