diff options
author | Riccardo Spagni <ric@spagni.net> | 2016-03-11 20:15:10 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2016-03-11 20:15:10 +0200 |
commit | dfd0e9c97d80c5cd7115d6cbb49cce08168071b6 (patch) | |
tree | 7bb5c56c18c83f3180101e310198cb3e3fdf1ab7 /src/p2p/network_throttle.cpp | |
parent | Merge pull request #711 (diff) | |
parent | Need to link boost::chrono in more places now (diff) | |
download | monero-dfd0e9c97d80c5cd7115d6cbb49cce08168071b6.tar.xz |
Merge pull request #712
66c2fc7 Need to link boost::chrono in more places now (Howard Chu)
b937a2c Use boost::thread instead of std::thread (Howard Chu)
Diffstat (limited to '')
-rw-r--r-- | src/p2p/network_throttle.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
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<i_network_throttle> 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<i_network_throttle> 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<i_network_throttle> network_throttle_manager::m_obj_get_global_throttle_out; |