From 575db0417278eef0c854900885734fd068b97430 Mon Sep 17 00:00:00 2001 From: Liam Date: Sat, 23 Dec 2023 14:06:41 -0500 Subject: core_timing: use static typing for no-wait unschedule --- src/core/core_timing.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/core/core_timing.cpp') diff --git a/src/core/core_timing.cpp b/src/core/core_timing.cpp index 3b7b0aa45..d08c007bb 100644 --- a/src/core/core_timing.cpp +++ b/src/core/core_timing.cpp @@ -143,7 +143,8 @@ void CoreTiming::ScheduleLoopingEvent(std::chrono::nanoseconds start_time, event.Set(); } -void CoreTiming::UnscheduleEvent(const std::shared_ptr& event_type, bool wait) { +void CoreTiming::UnscheduleEvent(const std::shared_ptr& event_type, + UnscheduleEventType type) { { std::scoped_lock lk{basic_lock}; @@ -161,7 +162,7 @@ void CoreTiming::UnscheduleEvent(const std::shared_ptr& event_type, b } // Force any in-progress events to finish - if (wait) { + if (type == UnscheduleEventType::Wait) { std::scoped_lock lk{advance_lock}; } } -- cgit v1.2.3