mirror of
https://github.com/monero-project/monero.git
synced 2025-08-23 16:35:07 -04:00
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.
This commit is contained in:
parent
bdb93cbf3d
commit
513a658c87
8 changed files with 47 additions and 7 deletions
|
@ -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<cryptonote::
|
|||
size_t current_index = start_height;
|
||||
blocks_added = 0;
|
||||
|
||||
int threads = boost::thread::hardware_concurrency();
|
||||
int threads = tools::get_max_concurrency();
|
||||
if (threads > 1)
|
||||
{
|
||||
std::vector<crypto::hash> round_block_hashes(threads);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue