aboutsummaryrefslogtreecommitdiff
path: root/src/p2p/network_throttle.cpp
diff options
context:
space:
mode:
authorHoward Chu <hyc@symas.com>2016-03-11 12:25:28 +0000
committerHoward Chu <hyc@symas.com>2016-03-11 15:09:50 +0000
commitb937a2c915861900d047d4d4a24af31c454e3540 (patch)
treeceedf9b256b9769f72cb34319e4144ae127543dc /src/p2p/network_throttle.cpp
parentMerge pull request #705 (diff)
downloadmonero-b937a2c915861900d047d4d4a24af31c454e3540.tar.xz
Use boost::thread instead of std::thread
and all other associated IPC
Diffstat (limited to '')
-rw-r--r--src/p2p/network_throttle.cpp18
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;