summaryrefslogtreecommitdiffhomepage
path: root/options
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-12-30 10:32:58 +0100
committerStanislaw Halik <sthalik@misaki.pl>2016-12-30 10:32:58 +0100
commit768686a9238565a85a26172984788e6d39efd014 (patch)
tree880344075d16fa872548fbd49c8c4ffb1194e2d7 /options
parent483d5ee7c967442283284bcc84bccce4d2625033 (diff)
options/scoped: clarify usage
Also the original comment was irrelevant.
Diffstat (limited to 'options')
-rw-r--r--options/scoped.cpp5
1 files 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;
}