MCPcopy Create free account
hub / github.com/OriginQ/QPanda-2 / append

Method append

include/Core/Utilities/Tools/ThreadPool.h:55–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53 }
54
55 bool append(Task task) {
56 if (!m_init_ok){
57 QCERR_AND_THROW(run_fail, "Error: Failed to append task, please initialize the threadPool first.");
58 }
59
60 m_queue_mutex.lock();
61 m_tasks_queue.push(task);
62 m_queue_mutex.unlock();
63
64 m_condition.notify_all();
65 return true;
66 }
67
68private:
69 void run() {

Callers 5

QPEMethod · 0.45
OriginCollectionMethod · 0.45
getValueByKeyMethod · 0.45
getJsonStringMethod · 0.45

Calls 3

lockMethod · 0.45
pushMethod · 0.45
unlockMethod · 0.45

Tested by

no test coverage detected