diff options
author | Riccardo Spagni <ric@spagni.net> | 2017-11-14 15:30:03 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2017-11-14 15:30:03 +0200 |
commit | 0d0ce8c21e2b0dafbf9e684144ebbdf6682578e5 (patch) | |
tree | 827494a037b78191469402bea893a2c5f37534a7 /src/common | |
parent | Merge pull request #2738 (diff) | |
parent | Increase LMDB maxreaders if large number of threads in use (diff) | |
download | monero-0d0ce8c21e2b0dafbf9e684144ebbdf6682578e5.tar.xz |
Merge pull request #2742
7c7d3672 Increase LMDB maxreaders if large number of threads in use (Howard Chu)
6738753b Use max_concurrency as-is (Howard Chu)
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/threadpool.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/threadpool.cpp b/src/common/threadpool.cpp index 41d0c25e0..20c5765b0 100644 --- a/src/common/threadpool.cpp +++ b/src/common/threadpool.cpp @@ -39,7 +39,7 @@ namespace tools threadpool::threadpool() : running(true), active(0) { boost::thread::attributes attrs; attrs.set_stack_size(THREAD_STACK_SIZE); - max = tools::get_max_concurrency() * 2; + max = tools::get_max_concurrency(); size_t i = max; while(i--) { threads.push_back(boost::thread(attrs, boost::bind(&threadpool::run, this))); @@ -74,7 +74,7 @@ void threadpool::submit(waiter *obj, std::function<void()> f) { } int threadpool::get_max_concurrency() { - return max / 2; + return max; } void threadpool::waiter::wait() { |