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

Function setThreadPoolInfo

src/UtilsCtrl/ThreadPool/Thread/UThreadSecondary.h:34–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32 thread_ = std::thread(&UThreadSecondary::run, this);
33 setSchedParam();
34 CGRAPH_FUNCTION_END
35 }
36
37
38 /**
39 * 设置pool的信息
40 * @param poolTaskQueue
41 * @param poolPriorityTaskQueue
42 * @param config
43 * @return
44 */
45 CStatus setThreadPoolInfo(UAtomicQueue<UTask>* poolTaskQueue,
46 UAtomicPriorityQueue<UTask>* poolPriorityTaskQueue,
47 const UThreadPoolConfigPtr config) {
48 CGRAPH_FUNCTION_BEGIN
49 CGRAPH_ASSERT_INIT(false) // 初始化之前,设置参数
50 CGRAPH_ASSERT_NOT_NULL(poolTaskQueue, poolPriorityTaskQueue, config)
51
52 this->pool_task_queue_ = poolTaskQueue;
53 this->pool_priority_task_queue_ = poolPriorityTaskQueue;
54 this->config_ = config;
55 CGRAPH_FUNCTION_END
56 }
57
58
59 CStatus run() final {

Callers

nothing calls this directly

Calls 1

CGRAPH_ASSERT_NOT_NULLFunction · 0.85

Tested by

no test coverage detected