MCPcopy Create free account
hub / github.com/ChunelFeng/CGraph / pushTask

Function pushTask

src/UtilsCtrl/ThreadPool/Thread/UThreadPrimary.h:133–140  ·  view source on GitHub ↗

* 依次push到队列里。如果失败,则yield,然后重新push * @param task * @return */

Source from the content-addressed store, hash-verified

131 * @return
132 */
133 CVoid pushTask(UTask&& task) {
134 wsq_.push(std::move(task));
135 {
136 CGRAPH_LOCK_GUARD lk(mutex_);
137 cur_empty_epoch_ = 0;
138 }
139 cv_.notify_one();
140 }
141
142
143 /**

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected