diff options
| author | Liam <byteslice@airmail.cc> | 2023-12-23 14:06:41 -0500 |
|---|---|---|
| committer | Liam <byteslice@airmail.cc> | 2023-12-23 15:36:46 -0500 |
| commit | 468ef514f10aa7b865e4aeed2dfc520024f0ff26 (patch) | |
| tree | 6663a52529852ca1279b7461807e3beb8ed312af /src/core/core_timing.cpp | |
| parent | b9545c5a0e514df861937340a3c5b2be75882201 (diff) | |
core_timing: use static typing for no-wait unschedule
Diffstat (limited to 'src/core/core_timing.cpp')
| -rw-r--r-- | src/core/core_timing.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/core_timing.cpp b/src/core/core_timing.cpp index 3b7b0aa45f..d08c007bbe 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<EventType>& event_type, bool wait) { +void CoreTiming::UnscheduleEvent(const std::shared_ptr<EventType>& event_type, + UnscheduleEventType type) { { std::scoped_lock lk{basic_lock}; @@ -161,7 +162,7 @@ void CoreTiming::UnscheduleEvent(const std::shared_ptr<EventType>& event_type, b } // Force any in-progress events to finish - if (wait) { + if (type == UnscheduleEventType::Wait) { std::scoped_lock lk{advance_lock}; } } |
