summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2016-04-08 08:40:49 (GMT)
committerTobias Markmann <tm@ayena.de>2016-04-12 14:12:45 (GMT)
commitb9ad76af13fc1d253845e027f91f22039bf14f9c (patch)
treec70d592a6bbbaae96e818e1de92e82e53390f393 /Swiften/History
parent4e6713df2d55dc1b2970d9c3b619d2a415e1264f (diff)
downloadswift-b9ad76af13fc1d253845e027f91f22039bf14f9c.zip
swift-b9ad76af13fc1d253845e027f91f22039bf14f9c.tar.bz2
Use C++11 threading library instead of Boost.Thread
This cuts down our dependency on Boost further. Another benefit is that mutex classes of C++11 standard library are recognized by TSAN. Test-Information: Unit and integration tests pass on OS X 10.11.4. Change-Id: Id4dcdb42e3d5155e107ce1d7618acbf26f913b6f
Diffstat (limited to 'Swiften/History')
-rw-r--r--Swiften/History/SQLiteHistoryStorage.cpp2
-rw-r--r--Swiften/History/SQLiteHistoryStorage.h5
2 files changed, 4 insertions, 3 deletions
diff --git a/Swiften/History/SQLiteHistoryStorage.cpp b/Swiften/History/SQLiteHistoryStorage.cpp
index d5ef8ad..ed15a2a 100644
--- a/Swiften/History/SQLiteHistoryStorage.cpp
+++ b/Swiften/History/SQLiteHistoryStorage.cpp
@@ -30,7 +30,7 @@ inline std::string getEscapedString(const std::string& s) {
namespace Swift {
SQLiteHistoryStorage::SQLiteHistoryStorage(const boost::filesystem::path& file) : db_(nullptr) {
- thread_ = new boost::thread(boost::bind(&SQLiteHistoryStorage::run, this));
+ thread_ = new std::thread(boost::bind(&SQLiteHistoryStorage::run, this));
sqlite3_open(pathToString(file).c_str(), &db_);
if (!db_) {
diff --git a/Swiften/History/SQLiteHistoryStorage.h b/Swiften/History/SQLiteHistoryStorage.h
index b0223f5..57f0d35 100644
--- a/Swiften/History/SQLiteHistoryStorage.h
+++ b/Swiften/History/SQLiteHistoryStorage.h
@@ -6,9 +6,10 @@
#pragma once
+#include <thread>
+
#include <boost/filesystem/path.hpp>
#include <boost/optional.hpp>
-#include <boost/thread.hpp>
#include <Swiften/Base/API.h>
#include <Swiften/History/HistoryStorage.h>
@@ -38,6 +39,6 @@ namespace Swift {
boost::optional<long long> getIDFromJID(const JID& jid) const;
sqlite3* db_;
- boost::thread* thread_;
+ std::thread* thread_;
};
}