Skip to main content
deleted 66 characters in body
Source Link

You give 3 threadpool constructors:

threadpool::threadpool()
    : threadpool(std::thread::hardware_concurrency())
{ };

threadpool::threadpool(size_t concurrency)
    : threadpool(concurrency, 128)
{ };

threadpool::threadpool(size_t concurrency, size_t queue_size)

You could use one threadpool constructor with default arguments:

threadpool::threadpool(
        size_t concurrency=std::thread::hardware_concurrency()
      , size_t queue_size=128
)

BTW, thanks for posting this. I am just now taking up threading.

You give 3 threadpool constructors:

threadpool::threadpool()
    : threadpool(std::thread::hardware_concurrency())
{ };

threadpool::threadpool(size_t concurrency)
    : threadpool(concurrency, 128)
{ };

threadpool::threadpool(size_t concurrency, size_t queue_size)

You could use one threadpool constructor with default arguments:

threadpool::threadpool(
        size_t concurrency=std::thread::hardware_concurrency()
      , size_t queue_size=128
)

BTW, thanks for posting this. I am just now taking up threading.

You give 3 threadpool constructors:

threadpool::threadpool()
    : threadpool(std::thread::hardware_concurrency())
{ };

threadpool::threadpool(size_t concurrency)
    : threadpool(concurrency, 128)
{ };

threadpool::threadpool(size_t concurrency, size_t queue_size)

You could use one threadpool constructor with default arguments:

threadpool::threadpool(
        size_t concurrency=std::thread::hardware_concurrency()
      , size_t queue_size=128
)
Source Link

You give 3 threadpool constructors:

threadpool::threadpool()
    : threadpool(std::thread::hardware_concurrency())
{ };

threadpool::threadpool(size_t concurrency)
    : threadpool(concurrency, 128)
{ };

threadpool::threadpool(size_t concurrency, size_t queue_size)

You could use one threadpool constructor with default arguments:

threadpool::threadpool(
        size_t concurrency=std::thread::hardware_concurrency()
      , size_t queue_size=128
)

BTW, thanks for posting this. I am just now taking up threading.