Skip to content

Commit

Permalink
add a comment
Browse files Browse the repository at this point in the history
(cherry-picked from commit 0296b60)
  • Loading branch information
gfgtdf committed Oct 7, 2018
1 parent dd1960d commit 6ad9977
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/gui/core/timer.cpp
Expand Up @@ -44,7 +44,13 @@ static std::map<std::size_t, timer>& get_timers()
static std::map<std::size_t, timer>* ptimers = new std::map<std::size_t, timer>();
return *ptimers;
}
/** The id of the event being executed, 0 if none. */
/**
The id of the event being executed, 0 if none.
NOTE: it is possible that multiple timers are executed at the same time
if one of the timer starts an event loop for example if its handler
shows a dialog. In that case code that relies on this breaks. This
could probably fixed my making this a list/stack of ids.
*/
static std::size_t executing_id = 0;

/** Did somebody try to remove the timer during its execution? */
Expand Down

0 comments on commit 6ad9977

Please sign in to comment.