Second thread pool for IO

This commit is contained in:
SChernykh 2022-06-14 21:23:23 +02:00
parent c9cfa25183
commit 28f25c0dbc
8 changed files with 17 additions and 13 deletions

View file

@ -42,10 +42,14 @@ namespace tools
class threadpool
{
public:
static threadpool& getInstance() {
static threadpool& getInstanceForCompute() {
static threadpool instance;
return instance;
}
static threadpool& getInstanceForIO() {
static threadpool instance(8);
return instance;
}
static threadpool *getNewForUnitTests(unsigned max_threads = 0) {
return new threadpool(max_threads);
}