File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -297,13 +297,14 @@ void Scheduler::next() { // NOLINT
297297 // point, then wait until the next tag or until a new event is
298298 // inserted asynchronously into the queue
299299 if (physical_time < t_next.time_point ()) {
300- cv_schedule_.wait_until (lock, t_next.time_point ());
301- // Start over if an earlier event was inserted into the event queue by a physical action
302- if (t_next != event_queue_.begin ()->first ) {
300+ auto status = cv_schedule_.wait_until (lock, t_next.time_point ());
301+ // Start over if an event was inserted into the event queue by a physical action
302+ if (status == std::cv_status::no_timeout || t_next != event_queue_.begin ()->first ) {
303303 continue ;
304304 }
305305 // update physical time and continue otherwise
306306 physical_time = t_next.time_point ();
307+ reactor_assert (t_next == event_queue_.begin ()->first );
307308 }
308309 }
309310
You can’t perform that action at this time.
0 commit comments