Skip to content

mikemcqueen/wtf-threadpool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WTF-threadpool

An attempt at writing a threadpool with no mutex, queue, or atomics. Why? WTF, why not.

OK it uses one atomic for a makeshift stop token, but I suppose I could change it to actually be a stop token.

This pool is designed for use for only a special use case: when you have a quantity of work to do serially, and thus you depend (somehow) on the result of all of that work being completed, but you'd like to split the work up and execute it in parallel across multiple threads/CPUs.

Think of it as a lower-overhead (due to thread re-use), and number-of-thread capped version of std::async.

Uses C++20 features.

About

An unusual approach at implementing a threadpool. Not to be taken too seriously.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages