Skip to content

XertDev/thread_pool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Thread pool

Simple header-only library for processing tasks in thread pool written in c++20.
CodeFactor Ubuntu Windows

Example

	thread_pool::ThreadPool thread_pool;

	auto task_1 = thread_pool.enqueue([](){ return 7; });
	auto task_2 = thread_pool.enqueue([](){ return std::string("test"); });

	std::cout << task_1.get() << "\n">; //7
	std::cout << task_2.get() << "\n">; //test

License

MIT © Xert