Commit 0668272a authored by Dominik Charousset's avatar Dominik Charousset

Fix misleading comment

parent 7d702528
...@@ -144,13 +144,12 @@ struct default_action_impl : detail::atomic_ref_counted, action::impl { ...@@ -144,13 +144,12 @@ struct default_action_impl : detail::atomic_ref_counted, action::impl {
} }
void run() override { void run() override {
// Note: we do *not* set the state to disposed after running the function
// object. This allows the action to re-register itself when needed, e.g.,
// to implement time-based loops.
if (state_.load() == action::state::scheduled) { if (state_.load() == action::state::scheduled) {
f_(); f_();
if constexpr (IsSingleShot) if constexpr (IsSingleShot)
state_ = action::state::disposed; state_ = action::state::disposed;
// else: allow the action to re-register itself when needed by *not*
// setting the state to disposed, e.g., to implement time loops.
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment