diff options
author | SChernykh <sergey.v.chernykh@gmail.com> | 2022-06-14 21:23:23 +0200 |
---|---|---|
committer | SChernykh <sergey.v.chernykh@gmail.com> | 2022-09-20 10:22:12 +0200 |
commit | 6adf03cdc516a9236aac6dbd6f289750761b8d24 (patch) | |
tree | dd316915f51aaae8d711832b0bc40374dd822ba5 /src/wallet | |
parent | Merge pull request #8545 (diff) | |
download | monero-6adf03cdc516a9236aac6dbd6f289750761b8d24.tar.xz |
Second thread pool for IO
Diffstat (limited to 'src/wallet')
-rw-r--r-- | src/wallet/wallet2.cpp | 6 | ||||
-rw-r--r-- | src/wallet/wallet_rpc_payments.cpp | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index 588ddd572..931d6d900 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -2724,7 +2724,7 @@ void wallet2::process_parsed_blocks(uint64_t start_height, const std::vector<cry THROW_WALLET_EXCEPTION_IF(blocks.size() != parsed_blocks.size(), error::wallet_internal_error, "size mismatch"); THROW_WALLET_EXCEPTION_IF(!m_blockchain.is_in_bounds(current_index), error::out_of_hashchain_bounds_error); - tools::threadpool& tpool = tools::threadpool::getInstance(); + tools::threadpool& tpool = tools::threadpool::getInstanceForCompute(); tools::threadpool::waiter waiter(tpool); size_t num_txes = 0; @@ -2967,7 +2967,7 @@ void wallet2::pull_and_parse_next_blocks(uint64_t start_height, uint64_t &blocks pull_blocks(start_height, blocks_start_height, short_chain_history, blocks, o_indices, current_height); THROW_WALLET_EXCEPTION_IF(blocks.size() != o_indices.size(), error::wallet_internal_error, "Mismatched sizes of blocks and o_indices"); - tools::threadpool& tpool = tools::threadpool::getInstance(); + tools::threadpool& tpool = tools::threadpool::getInstanceForCompute(); tools::threadpool::waiter waiter(tpool); parsed_blocks.resize(blocks.size()); for (size_t i = 0; i < blocks.size(); ++i) @@ -3464,7 +3464,7 @@ void wallet2::refresh(bool trusted_daemon, uint64_t start_height, uint64_t & blo size_t try_count = 0; crypto::hash last_tx_hash_id = m_transfers.size() ? m_transfers.back().m_txid : null_hash; std::list<crypto::hash> short_chain_history; - tools::threadpool& tpool = tools::threadpool::getInstance(); + tools::threadpool& tpool = tools::threadpool::getInstanceForCompute(); tools::threadpool::waiter waiter(tpool); uint64_t blocks_start_height; std::vector<cryptonote::block_complete_entry> blocks; diff --git a/src/wallet/wallet_rpc_payments.cpp b/src/wallet/wallet_rpc_payments.cpp index 61eaa8070..8474fb568 100644 --- a/src/wallet/wallet_rpc_payments.cpp +++ b/src/wallet/wallet_rpc_payments.cpp @@ -144,7 +144,7 @@ bool wallet2::search_for_rpc_payment(uint64_t credits_target, uint32_t n_threads n_threads = boost::thread::hardware_concurrency(); std::vector<crypto::hash> hash(n_threads); - tools::threadpool& tpool = tools::threadpool::getInstance(); + tools::threadpool& tpool = tools::threadpool::getInstanceForCompute(); tools::threadpool::waiter waiter(tpool); const uint32_t local_nonce = nonce += n_threads; // wrapping's OK |