Capy64/Capy64/Assets/Lua/lib/event.lua
2023-01-07 16:59:47 +01:00

15 lines
No EOL
278 B
Lua

local event = {}
function event.pull(...)
local pars = table.pack(event.pullRaw(...))
if pars[1] == "interrupt" then
error("Interrupted", 0)
end
return table.unpack(pars)
end
function event.pullRaw(...)
return coroutine.yield(...)
end
return event