📄 thread_pool.cc
字号:
#include "thread_pool.h"using namespace std;thread_pool::thread_pool(int _i, int key) : total(_i) { #ifdef __DEBUG cout << " Create thread pool " << endl; #endif //create ipc queue to send/receive messages if((mqid = msgget(key,0))<0) { mqid = msgget(key, IPC_CREAT | IPC_EXCL | 0600); if (mqid < 0) { ERR_REPORT(); } }}thread_pool::~thread_pool() { #ifdef __DEBUG cout << " Thread pool canceled. " << endl; #endif msgctl(mqid,IPC_RMID,0);}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -