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

Function push

src/UtilsCtrl/ThreadPool/Queue/UAtomicQueue.h:106–111  ·  view source on GitHub ↗

* 传入数据 * @param value */

Source from the content-addressed store, hash-verified

104 * @param value
105 */
106 CVoid push(T&& value) {
107 std::unique_ptr<T> task(std::make_unique<T>(std::move(value)));
108 CGRAPH_LOCK_GUARD lk(mutex_);
109 queue_.push(std::move(task));
110 cv_.notify_one();
111 }
112
113
114 /**

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected