From b937a2c915861900d047d4d4a24af31c454e3540 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Fri, 11 Mar 2016 12:25:28 +0000 Subject: Use boost::thread instead of std::thread and all other associated IPC --- src/wallet/wallet2.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/wallet/wallet2.cpp') diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index a86f2ffdf..389286ceb 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -204,7 +204,7 @@ void wallet2::process_new_transaction(const cryptonote::transaction& tx, uint64_ tx_pub_key = pub_key_field.pub_key; bool r = true; - int threads = std::thread::hardware_concurrency(); + int threads = boost::thread::hardware_concurrency(); if (miner_tx && m_refresh_type == RefreshNoCoinbase) { // assume coinbase isn't for us @@ -574,7 +574,7 @@ void wallet2::process_blocks(uint64_t start_height, const std::list 1) { std::vector round_block_hashes(threads); @@ -771,7 +771,7 @@ void wallet2::refresh(uint64_t start_height, uint64_t & blocks_fetched, bool& re size_t try_count = 0; crypto::hash last_tx_hash_id = m_transfers.size() ? get_transaction_hash(m_transfers.back().m_tx) : null_hash; std::list short_chain_history; - std::thread pull_thread; + boost::thread pull_thread; uint64_t blocks_start_height; std::list blocks; @@ -788,7 +788,7 @@ void wallet2::refresh(uint64_t start_height, uint64_t & blocks_fetched, bool& re uint64_t next_blocks_start_height; std::list next_blocks; bool error = false; - pull_thread = std::thread([&]{pull_next_blocks(start_height, next_blocks_start_height, short_chain_history, blocks, next_blocks, error);}); + pull_thread = boost::thread([&]{pull_next_blocks(start_height, next_blocks_start_height, short_chain_history, blocks, next_blocks, error);}); process_blocks(blocks_start_height, blocks, added_blocks); blocks_fetched += added_blocks; @@ -1312,7 +1312,7 @@ bool wallet2::prepare_file_names(const std::string& file_path) //---------------------------------------------------------------------------------------------------- bool wallet2::check_connection() { - std::lock_guard lock(m_daemon_rpc_mutex); + boost::lock_guard lock(m_daemon_rpc_mutex); if(m_http_client.is_connected()) return true; -- cgit v1.2.3