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

Function setThreadPoolInfo

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

* 注册线程池相关内容,需要在init之前使用 * @param index * @param poolTaskQueue * @param poolThreads * @param config */

Source from the content-addressed store, hash-verified

47 * @param config
48 */
49 CStatus setThreadPoolInfo(const int index,
50 UAtomicQueue<UTask>* poolTaskQueue,
51 std::vector<UThreadPrimary *>* poolThreads,
52 const UThreadPoolConfigPtr config) {
53 CGRAPH_FUNCTION_BEGIN
54 CGRAPH_ASSERT_INIT(false) // 初始化之前,设置参数
55 CGRAPH_ASSERT_NOT_NULL(poolTaskQueue, poolThreads, config)
56
57 this->index_ = index;
58 this->pool_task_queue_ = poolTaskQueue;
59 this->pool_threads_ = poolThreads;
60 this->config_ = config;
61 CGRAPH_FUNCTION_END
62 }
63
64
65 /**

Callers

nothing calls this directly

Calls 1

CGRAPH_ASSERT_NOT_NULLFunction · 0.85

Tested by

no test coverage detected