From 513a658c87b5fa23533a6b6db36e6d36af6a861d Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Thu, 28 Apr 2016 20:25:33 +0100 Subject: add a --max-concurrency flag It sets the max number of threads to use for a parallel job. This is different that the number of total threads, since monero binaries typically start a lot of them. --- src/wallet/wallet2.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/wallet') diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index 53ce23490..dd83891df 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -213,7 +213,7 @@ void wallet2::process_new_transaction(const cryptonote::transaction& tx, uint64_ tx_pub_key = pub_key_field.pub_key; bool r = true; - int threads = boost::thread::hardware_concurrency(); + int threads = tools::get_max_concurrency(); if (miner_tx && m_refresh_type == RefreshNoCoinbase) { // assume coinbase isn't for us @@ -603,7 +603,7 @@ void wallet2::process_blocks(uint64_t start_height, const std::list 1) { std::vector round_block_hashes(threads); -- cgit v1.2.3