summaryrefslogtreecommitdiff
path: root/zen/thread.h
diff options
context:
space:
mode:
authorDaniel Wilhelm <shieldwed@outlook.com>2017-03-12 22:00:35 -0600
committerDaniel Wilhelm <shieldwed@outlook.com>2017-03-12 22:00:35 -0600
commit3ba62ef1de77153e5a8c7bad4451b96f6a1678b0 (patch)
treee6e69717e394a528a2e2aca3af036d4befaa9658 /zen/thread.h
parent8.9 (diff)
downloadFreeFileSync-3ba62ef1de77153e5a8c7bad4451b96f6a1678b0.tar.gz
FreeFileSync-3ba62ef1de77153e5a8c7bad4451b96f6a1678b0.tar.bz2
FreeFileSync-3ba62ef1de77153e5a8c7bad4451b96f6a1678b0.zip
8.10
Diffstat (limited to 'zen/thread.h')
-rwxr-xr-xzen/thread.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/zen/thread.h b/zen/thread.h
index a59f3807..ae4c347e 100755
--- a/zen/thread.h
+++ b/zen/thread.h
@@ -28,26 +28,26 @@ public:
template <class Function>
InterruptibleThread(Function&& f);
- bool joinable () const { return stdThread.joinable(); }
+ bool joinable () const { return stdThread_.joinable(); }
void interrupt();
- void join () { stdThread.join(); }
- void detach () { stdThread.detach(); }
+ void join () { stdThread_.join(); }
+ void detach () { stdThread_.detach(); }
template <class Rep, class Period>
bool tryJoinFor(const std::chrono::duration<Rep, Period>& relTime)
{
- if (threadCompleted.wait_for(relTime) == std::future_status::ready)
+ if (threadCompleted_.wait_for(relTime) == std::future_status::ready)
{
- stdThread.join(); //runs thread-local destructors => this better be fast!!!
+ stdThread_.join(); //runs thread-local destructors => this better be fast!!!
return true;
}
return false;
}
private:
- std::thread stdThread;
+ std::thread stdThread_;
std::shared_ptr<InterruptionStatus> intStatus_;
- std::future<void> threadCompleted;
+ std::future<void> threadCompleted_;
};
//context of worker thread:
@@ -376,9 +376,9 @@ template <class Function> inline
InterruptibleThread::InterruptibleThread(Function&& f) : intStatus_(std::make_shared<InterruptionStatus>())
{
std::promise<void> pFinished;
- threadCompleted = pFinished.get_future();
+ threadCompleted_ = pFinished.get_future();
- stdThread = std::thread([f = std::forward<Function>(f),
+ stdThread_ = std::thread([f = std::forward<Function>(f),
intStatus = this->intStatus_,
pFinished = std::move(pFinished)]() mutable
{
bgstack15