aboutsummaryrefslogtreecommitdiff
path: root/src/common/threadpool.h
diff options
context:
space:
mode:
authorSChernykh <sergey.v.chernykh@gmail.com>2022-06-14 21:23:23 +0200
committerSChernykh <sergey.v.chernykh@gmail.com>2022-09-20 10:22:12 +0200
commit6adf03cdc516a9236aac6dbd6f289750761b8d24 (patch)
treedd316915f51aaae8d711832b0bc40374dd822ba5 /src/common/threadpool.h
parent7cbae6ca988dedbe358ee5edbf9bdd610673a8ee (diff)
downloadmonzero-core-6adf03cdc516a9236aac6dbd6f289750761b8d24.tar.gz
monzero-core-6adf03cdc516a9236aac6dbd6f289750761b8d24.tar.xz
monzero-core-6adf03cdc516a9236aac6dbd6f289750761b8d24.zip
Second thread pool for IO
Diffstat (limited to 'src/common/threadpool.h')
-rw-r--r--src/common/threadpool.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/common/threadpool.h b/src/common/threadpool.h
index ce1bc5799..53421e18b 100644
--- a/src/common/threadpool.h
+++ b/src/common/threadpool.h
@@ -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);
}