From 768686a9238565a85a26172984788e6d39efd014 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Fri, 30 Dec 2016 10:32:58 +0100 Subject: options/scoped: clarify usage Also the original comment was irrelevant. --- options/scoped.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/options/scoped.cpp b/options/scoped.cpp index b0677ad9..96f4a261 100644 --- a/options/scoped.cpp +++ b/options/scoped.cpp @@ -13,10 +13,9 @@ std::atomic_bool opts::teardown_flag(false); void opts::set_teardown_flag(bool value) { + // flag being set means "opts" is about to go out of scope due to tracker stop + // in this case we don't reload options. we only want to reload when cancel is pressed. ensure_thread(); - - // we don't use exceptions in the whole project so no need for unwind protection - // also the calls aren't nested so no need for CAS either teardown_flag = value; } -- cgit v1.2.3