diff options
author | Howard Chu <hyc@symas.com> | 2017-10-30 18:06:05 +0000 |
---|---|---|
committer | Howard Chu <hyc@symas.com> | 2017-11-02 16:33:48 +0000 |
commit | 6738753b3054aa69a4b585d3d9c1fdbd2b0824d4 (patch) | |
tree | af066af1fb314f54b260b4201656676cafe7e596 /src | |
parent | Merge pull request #2601 (diff) | |
download | monero-6738753b3054aa69a4b585d3d9c1fdbd2b0824d4.tar.xz |
Use max_concurrency as-is
Don't try to 2nd guess user
Diffstat (limited to 'src')
-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() { |