← Back to context

Comment by OnlyMortal

3 years ago

If you’re in C++ land, you might take a look at Boost ASIO. It’s not just for IPC and would give you portable code.

And in C++ can also use this dead-simple header file for a nice high-level, modern threadpool using function objects (lambdas) for very easy parallelization of arbitrary tasks: https://github.com/progschj/ThreadPool

  • Simple bit of code for a simple threadpool.

    I spotted a bug in it though which may manifest itself depending on platform.

    • What did you find? The code is quite widely used, and I’ve also used it extensively for years without any problems.