muduo中threadpool中一些理解
void threadPool_unittest(){threadPool pool("MainThreadPool");pool.setMaxQueueSize(1);pool.start(5);pool.run(print);pool.run(print);for (int i = 0; i < 1000; ++i){char buf[32];snprintf(buf, sizeof buf, "task %d", i);pool...
原创
2021-06-15 10:48:50 ·
151 阅读 ·
0 评论