Second thread pool for IO

This commit is contained in:
SChernykh 2022-06-14 21:23:23 +02:00
parent 7cbae6ca98
commit 6adf03cdc5
8 changed files with 17 additions and 13 deletions

View file

@ -3434,7 +3434,7 @@ bool Blockchain::check_tx_inputs(transaction& tx, tx_verification_context &tvc,
std::vector < uint64_t > results;
results.resize(tx.vin.size(), 0);
tools::threadpool& tpool = tools::threadpool::getInstance();
tools::threadpool& tpool = tools::threadpool::getInstanceForCompute();
tools::threadpool::waiter waiter(tpool);
int threads = tpool.get_max_concurrency();
@ -5137,7 +5137,7 @@ bool Blockchain::prepare_handle_incoming_blocks(const std::vector<block_complete
return true;
bool blocks_exist = false;
tools::threadpool& tpool = tools::threadpool::getInstance();
tools::threadpool& tpool = tools::threadpool::getInstanceForCompute();
unsigned threads = tpool.get_max_concurrency();
blocks.resize(blocks_entry.size());