progschj / ThreadPool

A simple C++11 Thread Pool implementation
zlib License
7.85k stars 2.24k forks source link

it would be nice to add a query method to see if any workers are hot #52

Open littlebirds opened 6 years ago

littlebirds commented 6 years ago

Some thing like getActiveCount() in java, so to let consumers of the threadpool know if waiting is needed.

jhasse commented 6 years ago

You can check this by calling .wait_for(chrono::seconds(0)) on the futures and see for how many it doesn't return std::future_status::ready.