From d7b7804215e451d620894affedc57a42b5105f6b Mon Sep 17 00:00:00 2001 From: gingerBill Date: Wed, 21 Feb 2024 12:55:26 +0000 Subject: `if` -> `while` in `wait_signal_until_available` to check for spurious wake-ups --- src/threading.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/threading.cpp') diff --git a/src/threading.cpp b/src/threading.cpp index 725b58c89..4f7f5b12b 100644 --- a/src/threading.cpp +++ b/src/threading.cpp @@ -112,7 +112,7 @@ struct Wait_Signal { }; gb_internal void wait_signal_until_available(Wait_Signal *ws) { - if (ws->futex.load() == 0) { + while (ws->futex.load() == 0) { futex_wait(&ws->futex, 1); } } -- cgit v1.2.3