From cd3dd80c238fb4deddb7757e0f3b5275f1953bdd Mon Sep 17 00:00:00 2001 From: WahPlus Date: Tue, 30 Sep 2025 15:26:35 +0300 Subject: [PATCH] Made event.pull() with a timeout of 0 not yield. This makes sense because if the timeout is 0, the app calling it obviously just wants to fetch any pending events and not wait. --- lib/event.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/event.lua b/lib/event.lua index eada457..dc936be 100644 --- a/lib/event.lua +++ b/lib/event.lua @@ -48,7 +48,9 @@ function event.pull(...) end -- Yield to allow other processes to run and more events to be added - coroutine.yield() + if timeout and timeout > 0 then + coroutine.yield() + end end end