From c2a6bd92faa5a186791b62c5264390158a4e5af0 Mon Sep 17 00:00:00 2001 From: Jamie Reece Wilson Date: Sat, 2 Sep 2023 19:09:04 +0100 Subject: [PATCH] [*] Minor optimization in a shit primitive --- Source/Threading/Primitives/AuEvent.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Source/Threading/Primitives/AuEvent.cpp b/Source/Threading/Primitives/AuEvent.cpp index 897fc461..59d7fa3f 100644 --- a/Source/Threading/Primitives/AuEvent.cpp +++ b/Source/Threading/Primitives/AuEvent.cpp @@ -101,7 +101,15 @@ namespace Aurora::Threading::Primitives SysAssertExp((this->bPermitMultipleTriggers_) || (!this->bTriggered_), "Can not trigger an awake event object"); this->bTriggered_ = true; } - this->condition_.Broadcast(); + + if (this->bAtomicRelease_) + { + this->condition_.Signal(); + } + else + { + this->condition_.Broadcast(); + } } bool EventImpl::HasOSHandle(AuMach &mach)