Reuzel – A tiny C++ thread pool
github.com
Reuzel – A tiny C++ thread pool
1–10 of 29 posts
Re: Reuzel – A tiny C++ thread pool
#2Re: Reuzel – A tiny C++ thread pool
#3The C++11 thread library ( http://en.cppreference.com/w/cpp/thread ) is at least not insane, and at best you might even like it. In my view it's certainly a better bet than pthreads, because it runs on Windows too.
Re: Reuzel – A tiny C++ thread pool
#4using std::string;
It's not cool to impose that decision on clients of the library.
Re: Reuzel – A tiny C++ thread pool
#5The C++11 thread library ( http://en.cppreference.com/w/cpp/thread ) is at least not insane, and at best you might even like it. In my view it's certainly a better bet than pthreads, because it runs on Windows too.
Indeed, it's portable and part of the standard. Personally I'm a big fan of this implementation: https://github.com/progschj/ThreadPool/
Re: Reuzel – A tiny C++ thread pool
#6Re: Reuzel – A tiny C++ thread pool
#7Re: Reuzel – A tiny C++ thread pool
#8Re: Reuzel – A tiny C++ thread pool
#9The C++11 thread library ( http://en.cppreference.com/w/cpp/thread ) is at least not insane, and at best you might even like it. In my view it's certainly a better bet than pthreads, because it runs on Windows too.
Talks in-depth about the thread library and also other C++11 features that made it possible. Highly recommended.
Re: Reuzel – A tiny C++ thread pool
#10PSA: Please don't do stuff like this in header files: using std::string; It's not cool to impose that decision on clients of the library.
This should almost always be ok since no sane programmer should ever name their class string in the namespace of std.
As a developer, I wouldn't feel too bad about causing namespace conflicts in this manner because hopefully it will suggest to the maintainer that their class name is a poor choice.