From 8d66e8a2b8cfe4eef4b946a1ab64354dfd7da00b Mon Sep 17 00:00:00 2001 From: Daniel Wilhelm Date: Sat, 29 Oct 2016 11:34:19 +0200 Subject: 8.4 --- zen/thread.h | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'zen/thread.h') 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 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 pt(std::forward(fun)); @@ -334,7 +334,8 @@ private: activeCondition = cv; } - std::atomic interrupted{ false }; //std:atomic is uninitialized by default! + std::atomic 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!) -- cgit