mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-11-27 20:14:28 +01:00
Merge pull request #466 from Subv/wake
Thread: Prevent waking a thread multiple times.
This commit is contained in:
commit
542b0b0057
@ -263,6 +263,9 @@ void WakeThreadAfterDelay(Thread* thread, s64 nanoseconds) {
|
||||
|
||||
/// Resumes a thread from waiting by marking it as "ready"
|
||||
void Thread::ResumeFromWait() {
|
||||
// Cancel any outstanding wakeup events
|
||||
CoreTiming::UnscheduleEvent(ThreadWakeupEventType, GetHandle());
|
||||
|
||||
status &= ~THREADSTATUS_WAIT;
|
||||
wait_object = nullptr;
|
||||
wait_type = WAITTYPE_NONE;
|
||||
|
Loading…
Reference in New Issue
Block a user