From 0953cdd271c0a62a9b336e66fa2d5583a633746f Mon Sep 17 00:00:00 2001 From: Liam Date: Sat, 14 Jan 2023 15:48:01 -0500 Subject: timing: wait for completion on unregister --- src/core/core_timing.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/core/core_timing.h') diff --git a/src/core/core_timing.h b/src/core/core_timing.h index b5925193c..da366637b 100644 --- a/src/core/core_timing.h +++ b/src/core/core_timing.h @@ -98,10 +98,13 @@ public: const std::shared_ptr& event_type, std::uintptr_t user_data = 0, bool absolute_time = false); - void UnscheduleEvent(const std::shared_ptr& event_type, std::uintptr_t user_data); + void UnscheduleEvent(const std::shared_ptr& event_type, std::uintptr_t user_data, + bool wait = true); - /// We only permit one event of each type in the queue at a time. - void RemoveEvent(const std::shared_ptr& event_type); + void UnscheduleEventWithoutWait(const std::shared_ptr& event_type, + std::uintptr_t user_data) { + UnscheduleEvent(event_type, user_data, false); + } void AddTicks(u64 ticks_to_add); -- cgit v1.2.3