aboutsummaryrefslogtreecommitdiff
path: root/src/p2p/data_logger.hpp
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2016-03-11 20:15:10 +0200
committerRiccardo Spagni <ric@spagni.net>2016-03-11 20:15:10 +0200
commitdfd0e9c97d80c5cd7115d6cbb49cce08168071b6 (patch)
tree7bb5c56c18c83f3180101e310198cb3e3fdf1ab7 /src/p2p/data_logger.hpp
parentMerge pull request #711 (diff)
parentNeed to link boost::chrono in more places now (diff)
downloadmonero-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 '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
};