aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'contrib')
-rw-r--r--contrib/epee/include/console_handler.h5
-rw-r--r--contrib/epee/include/net/levin_protocol_handler_async.h3
-rw-r--r--contrib/epee/include/syncobj.h10
3 files changed, 9 insertions, 9 deletions
diff --git a/contrib/epee/include/console_handler.h b/contrib/epee/include/console_handler.h
index 5c63556ae..d76d7930c 100644
--- a/contrib/epee/include/console_handler.h
+++ b/contrib/epee/include/console_handler.h
@@ -36,6 +36,7 @@
#ifdef __OpenBSD__
#include <stdio.h>
#endif
+#include <boost/thread.hpp>
namespace epee
{
@@ -47,7 +48,7 @@ namespace epee
, m_has_read_request(false)
, m_read_status(state_init)
{
- m_reader_thread = std::thread(std::bind(&async_stdin_reader::reader_thread_func, this));
+ m_reader_thread = boost::thread(std::bind(&async_stdin_reader::reader_thread_func, this));
}
~async_stdin_reader()
@@ -212,7 +213,7 @@ namespace epee
};
private:
- std::thread m_reader_thread;
+ boost::thread m_reader_thread;
std::atomic<bool> m_run;
std::string m_line;
diff --git a/contrib/epee/include/net/levin_protocol_handler_async.h b/contrib/epee/include/net/levin_protocol_handler_async.h
index a7fbffb4b..7331faa35 100644
--- a/contrib/epee/include/net/levin_protocol_handler_async.h
+++ b/contrib/epee/include/net/levin_protocol_handler_async.h
@@ -26,6 +26,7 @@
#pragma once
#include <boost/uuid/uuid_generators.hpp>
+#include <boost/unordered_map.hpp>
#include <boost/interprocess/detail/atomic.hpp>
#include <boost/smart_ptr/make_shared.hpp>
@@ -52,7 +53,7 @@ class async_protocol_handler;
template<class t_connection_context>
class async_protocol_handler_config
{
- typedef std::map<boost::uuids::uuid, async_protocol_handler<t_connection_context>* > connections_map;
+ typedef boost::unordered_map<boost::uuids::uuid, async_protocol_handler<t_connection_context>* > connections_map;
critical_section m_connects_lock;
connections_map m_connects;
diff --git a/contrib/epee/include/syncobj.h b/contrib/epee/include/syncobj.h
index b81eb43a9..275324436 100644
--- a/contrib/epee/include/syncobj.h
+++ b/contrib/epee/include/syncobj.h
@@ -30,8 +30,6 @@
#ifndef __WINH_OBJ_H__
#define __WINH_OBJ_H__
-#include <condition_variable>
-#include <mutex>
#include <boost/thread/locks.hpp>
#include <boost/thread/mutex.hpp>
#include <boost/thread/recursive_mutex.hpp>
@@ -51,22 +49,22 @@ namespace epee
void raise()
{
- std::unique_lock<std::mutex> lock(m_mx);
+ boost::unique_lock<boost::mutex> lock(m_mx);
m_rised = true;
m_cond_var.notify_one();
}
void wait()
{
- std::unique_lock<std::mutex> lock(m_mx);
+ boost::unique_lock<boost::mutex> lock(m_mx);
while (!m_rised)
m_cond_var.wait(lock);
m_rised = false;
}
private:
- std::mutex m_mx;
- std::condition_variable m_cond_var;
+ boost::mutex m_mx;
+ boost::condition_variable m_cond_var;
bool m_rised;
};