Merge pull request #6336

760ecf2 console_handler: do not let exception past the dor (moneromooo-monero)
09c8111 threadpool: lock mutex in create (moneromooo-monero)
e377977 tx_pool: catch theoretical error in get_block_reward (moneromooo-monero)
This commit is contained in:
luigi1111 2020-03-31 15:14:12 -05:00
commit 6c7d928f19
No known key found for this signature in database
GPG key ID: F4ACA0183641E010
3 changed files with 13 additions and 4 deletions

View file

@ -71,6 +71,7 @@ void threadpool::recycle() {
}
void threadpool::create(unsigned int max_threads) {
const boost::unique_lock<boost::mutex> lock(mutex);
boost::thread::attributes attrs;
attrs.set_stack_size(THREAD_STACK_SIZE);
max = max_threads ? max_threads : tools::get_max_concurrency();