Upload Code
loading-left
loading loading loading
loading-right

Loading

Profile
No self-introduction
codes (1)
Thread Association class
no vote
#Include & quot; ThreadPool. H & quot; # - include & quot; workerthread. H & quot; # - include & quot; task. H & quot; / * * *_ threadNum = initnum;m_ Maxthrnum = initnum * 2; / / maximum number of threads for (int i = 0; I & lt; m_ threadNum; i++){        CWorkerThread* thr = new CWorkerThread();        thr->SetThreadPool(this);        thr->Start();AppendToIdleList(thr);    }m_ monitor = 0;}CThreadPool::~CThreadPool(){    TerminateAll();}void CThreadPool::TerminateAll(){m_ mtxTaskList.Lock ();m_ taskList.clear ();m_ mtxTas
jack8812
2017-11-22
1
1
No more~