fix readme

This commit is contained in:
Evgeny
2021-08-04 16:05:46 +03:00
parent 3570854df3
commit e3326d282e
3 changed files with 14 additions and 3 deletions

10
sandbox.lua Normal file
View File

@@ -0,0 +1,10 @@
function sandbox(func)
local co = coroutine.create(func)
local hook = function() coroutine.yield('resource used too many cycles') end
debug.setupvalue(func, 1, _G)
debug.sethook(co, hook, "", 100)
coroutine.resume(co)
end