Skip to content

yuchuanwang/ThreadPool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ThreadPool

This is a basic ThreadPool with modern C++ (C++ 11). It will create threads as many as the cores number, and unlimited tasks in queue by default. Of course, you can change them as needed. Then you can add tasks into queue, and start the threads inside pool to handle the tasks. And you can wait for all threads to exit, and stop the pool once you get you tasks done. Please refer to the test.cpp for usage. Any feedback, please do not hesitate to let me know.