aboutsummaryrefslogtreecommitdiff
path: root/src/p2p/data_logger.hpp
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/data_logger.hpp
parentMerge pull request #705 (diff)
downloadmonero-b937a2c915861900d047d4d4a24af31c454e3540.tar.xz
Use boost::thread instead of std::thread
and all other associated IPC
Diffstat (limited to 'src/p2p/data_logger.hpp')
-rw-r--r--src/p2p/data_logger.hpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/p2p/data_logger.hpp b/src/p2p/data_logger.hpp
index affc97f5f..148afc0ab 100644
--- a/src/p2p/data_logger.hpp
+++ b/src/p2p/data_logger.hpp
@@ -33,8 +33,9 @@
#include <map>
#include <fstream>
#include <memory>
-#include <thread>
-#include <mutex>
+#include <boost/thread/thread.hpp>
+#include <boost/thread/mutex.hpp>
+#include <boost/thread/once.hpp>
#include <atomic>
namespace epee
@@ -71,7 +72,7 @@ enum class data_logger_state { state_before_init, state_during_init, state_ready
static bool is_dying();
private:
- static std::once_flag m_singleton; ///< to guarantee singleton creates the object exactly once
+ static boost::once_flag m_singleton; ///< to guarantee singleton creates the object exactly once
static data_logger_state m_state; ///< state of the singleton object
static std::atomic<bool> m_thread_maybe_running; ///< is the background thread (more or less) running, or is it fully finished
static std::unique_ptr<data_logger> m_obj; ///< the singleton object. Only use it via get_instance(). Can be killed by kill_instance()
@@ -94,7 +95,7 @@ enum class data_logger_state { state_before_init, state_during_init, state_ready
};
std::map<std::string, fileData> mFilesMap;
- std::mutex mMutex;
+ boost::mutex mMutex;
void saveToFile(); ///< write data to the target files. do not use this directly
};