mirror of
https://github.com/Ale32bit/Capy64.git
synced 2025-12-15 02:25:44 +00:00
15 lines
No EOL
278 B
Lua
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 |