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 09:59:58 +0200
commit28f25c0dbc7ec2cbc65f689afd0841735718ea45 (patch)
treed16a6c0af59fcdf4bab4195f63e01ce748a2f93c /src/common/threadpool.h
parentMerge pull request #8556 (diff)
downloadmonero-28f25c0dbc7ec2cbc65f689afd0841735718ea45.tar.xz
Second thread pool for IO
Diffstat (limited to '')
-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);
}