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.
This commit is contained in:
@@ -48,8 +48,10 @@ function event.pull(...)
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- Yield to allow other processes to run and more events to be added
|
-- Yield to allow other processes to run and more events to be added
|
||||||
|
if timeout and timeout > 0 then
|
||||||
coroutine.yield()
|
coroutine.yield()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
return event
|
return event
|
||||||
|
|||||||
Reference in New Issue
Block a user