File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -291,6 +291,7 @@ void Scheduler::next() { // NOLINT
291291 } else {
292292 // find the next tag
293293 auto t_next = event_queue_.begin ()->first ;
294+ log_.debug () << " try to advance logical time to tag " << t_next;
294295
295296 // synchronize with physical time if not in fast forward mode
296297 if (!environment_->fast_fwd_execution ()) {
@@ -305,9 +306,12 @@ void Scheduler::next() { // NOLINT
305306 // Wait until all input actions mark the tag as safe to process.
306307 bool result{true };
307308 for (auto * action : environment_->input_actions_ ) {
308- result = action->acquire_tag (t_next, lock, cv_schedule_,
309+ bool inner_result = action->acquire_tag (t_next, lock, cv_schedule_,
309310 [&t_next, this ]() { return t_next != event_queue_.begin ()->first ; });
310- if (!result) {
311+ // If the wait was aborted or if the next tag changed in the meantime,
312+ // we need to break from the loop and continue with the main loop.
313+ if (!inner_result || t_next != event_queue_.begin ()->first ) {
314+ result = false ;
311315 break ;
312316 }
313317 }
You can’t perform that action at this time.
0 commit comments