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/p2p/network_throttle.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/p2p/network_throttle.cpp') diff --git a/src/p2p/network_throttle.cpp b/src/p2p/network_throttle.cpp index 42f54964b..30538bb3c 100644 --- a/src/p2p/network_throttle.cpp +++ b/src/p2p/network_throttle.cpp @@ -67,9 +67,9 @@ namespace net_utils // ================================================================================================ // static: -std::mutex network_throttle_manager::m_lock_get_global_throttle_in; -std::mutex network_throttle_manager::m_lock_get_global_throttle_inreq; -std::mutex network_throttle_manager::m_lock_get_global_throttle_out; +boost::mutex network_throttle_manager::m_lock_get_global_throttle_in; +boost::mutex network_throttle_manager::m_lock_get_global_throttle_inreq; +boost::mutex network_throttle_manager::m_lock_get_global_throttle_out; int network_throttle_manager::xxx; @@ -77,27 +77,27 @@ int network_throttle_manager::xxx; // ================================================================================================ // methods: i_network_throttle & network_throttle_manager::get_global_throttle_in() { - std::call_once(m_once_get_global_throttle_in, [] { m_obj_get_global_throttle_in.reset(new network_throttle("in/all","<<< global-IN",10)); } ); + boost::call_once(m_once_get_global_throttle_in, [] { m_obj_get_global_throttle_in.reset(new network_throttle("in/all","<<< global-IN",10)); } ); return * m_obj_get_global_throttle_in; } -std::once_flag network_throttle_manager::m_once_get_global_throttle_in; +boost::once_flag network_throttle_manager::m_once_get_global_throttle_in; std::unique_ptr network_throttle_manager::m_obj_get_global_throttle_in; i_network_throttle & network_throttle_manager::get_global_throttle_inreq() { - std::call_once(m_once_get_global_throttle_inreq, [] { m_obj_get_global_throttle_inreq.reset(new network_throttle("inreq/all", "<== global-IN-REQ",10)); } ); + boost::call_once(m_once_get_global_throttle_inreq, [] { m_obj_get_global_throttle_inreq.reset(new network_throttle("inreq/all", "<== global-IN-REQ",10)); } ); return * m_obj_get_global_throttle_inreq; } -std::once_flag network_throttle_manager::m_once_get_global_throttle_inreq; +boost::once_flag network_throttle_manager::m_once_get_global_throttle_inreq; std::unique_ptr network_throttle_manager::m_obj_get_global_throttle_inreq; i_network_throttle & network_throttle_manager::get_global_throttle_out() { - std::call_once(m_once_get_global_throttle_out, [] { m_obj_get_global_throttle_out.reset(new network_throttle("out/all", ">>> global-OUT",10)); } ); + boost::call_once(m_once_get_global_throttle_out, [] { m_obj_get_global_throttle_out.reset(new network_throttle("out/all", ">>> global-OUT",10)); } ); return * m_obj_get_global_throttle_out; } -std::once_flag network_throttle_manager::m_once_get_global_throttle_out; +boost::once_flag network_throttle_manager::m_once_get_global_throttle_out; std::unique_ptr network_throttle_manager::m_obj_get_global_throttle_out; -- cgit v1.2.3