blockchain: don't run threads if we have just one function to run

This commit is contained in:
moneromooo-monero 2018-10-31 19:02:47 +00:00
parent 6f7a5fd4f7
commit 1426209a10
No known key found for this signature in database
GPG Key ID: 686F07454D6CEFC3

View File

@ -4171,7 +4171,7 @@ bool Blockchain::prepare_handle_incoming_blocks(const std::vector<block_complete
if (!m_db->can_thread_bulk_indices()) if (!m_db->can_thread_bulk_indices())
threads = 1; threads = 1;
if (threads > 1) if (threads > 1 && amounts.size() > 1)
{ {
tools::threadpool::waiter waiter; tools::threadpool::waiter waiter;