summaryrefslogtreecommitdiff
path: root/zen/thread.h
diff options
context:
space:
mode:
authorDaniel Wilhelm <shieldwed@outlook.com>2016-10-29 11:34:19 +0200
committerDaniel Wilhelm <shieldwed@outlook.com>2016-10-29 11:34:19 +0200
commit8d66e8a2b8cfe4eef4b946a1ab64354dfd7da00b (patch)
tree48e94273d3ee6b9d755e0081c46d29a387871611 /zen/thread.h
parent8.3 (diff)
downloadFreeFileSync-8d66e8a2b8cfe4eef4b946a1ab64354dfd7da00b.tar.gz
FreeFileSync-8d66e8a2b8cfe4eef4b946a1ab64354dfd7da00b.tar.bz2
FreeFileSync-8d66e8a2b8cfe4eef4b946a1ab64354dfd7da00b.zip
8.4
Diffstat (limited to 'zen/thread.h')
-rw-r--r--zen/thread.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/zen/thread.h b/zen/thread.h
index f747f965..fd9dc76d 100644
--- a/zen/thread.h
+++ b/zen/thread.h
@@ -1,8 +1,8 @@
-// **************************************************************************
-// * This file is part of the FreeFileSync project. It is distributed under *
-// * GNU General Public License: http://www.gnu.org/licenses/gpl-3.0 *
-// * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved *
-// **************************************************************************
+// *****************************************************************************
+// * This file is part of the FreeFileSync project. It is distributed under *
+// * GNU General Public License: http://www.gnu.org/licenses/gpl-3.0 *
+// * Copyright (C) Zenju (zenju AT freefilesync DOT org) - All Rights Reserved *
+// *****************************************************************************
#ifndef THREAD_H_7896323423432235246427
#define THREAD_H_7896323423432235246427
@@ -151,7 +151,7 @@ namespace impl
template <class Function> inline
auto runAsync(Function&& fun, TrueType /*copy-constructible*/)
{
- typedef decltype(fun()) ResultType;
+ using ResultType = decltype(fun());
//note: std::packaged_task does NOT support move-only function objects!
std::packaged_task<ResultType()> pt(std::forward<Function>(fun));
@@ -334,7 +334,8 @@ private:
activeCondition = cv;
}
- std::atomic<bool> interrupted{ false }; //std:atomic is uninitialized by default!
+ std::atomic<bool> interrupted{ false }; //std:atomic is uninitialized by default!!!
+ //"The default constructor is trivial: no initialization takes place other than zero initialization of static and thread-local objects."
std::condition_variable* activeCondition = nullptr;
std::mutex lockConditionPtr; //serialize pointer access (only!)
bgstack15