mirror of
https://github.com/monero-project/monero.git
synced 2025-08-18 15:57:59 -04:00
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)
This commit is contained in:
commit
0d0ce8c21e
2 changed files with 8 additions and 2 deletions
|
@ -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() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue