MCPcopy Create free account
hub / github.com/ChunelFeng/CThreadPool / push

Function push

src/UtilsCtrl/ThreadPool/Queue/UAtomicPriorityQueue.h:66–70  ·  view source on GitHub ↗

* 传入数据 * @param value * @param priority 任务优先级,数字排序 * @return */

Source from the content-addressed store, hash-verified

64 * @return
65 */
66 CVoid push(T&& value, int priority) {
67 std::unique_ptr<T> task(std::make_unique<T>(std::move(value), priority));
68 CGRAPH_LOCK_GUARD lk(mutex_);
69 priority_queue_.push(std::move(task));
70 }
71
72
73 /**

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected