From aeeacc3e2c4d8dee057d37f5ad8ddf1b9b0ea3a4 Mon Sep 17 00:00:00 2001 From: Elad <18193363+elad335@users.noreply.github.com> Date: Fri, 22 May 2026 15:10:16 +0300 Subject: [PATCH] Utilities/sema.cpp: Minor optimization --- Utilities/sema.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Utilities/sema.cpp b/Utilities/sema.cpp index ee3dd98ffa..81e3616f53 100644 --- a/Utilities/sema.cpp +++ b/Utilities/sema.cpp @@ -41,7 +41,13 @@ void semaphore_base::imp_wait() // Add waiter value += c_waiter; } - }); + else + { + return false; + } + + return true; + }).first; if (value & c_value_mask) {