aboutsummaryrefslogtreecommitdiff
path: root/util.lua
diff options
context:
space:
mode:
Diffstat (limited to 'util.lua')
-rw-r--r--util.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/util.lua b/util.lua
index b5c7043..852b933 100644
--- a/util.lua
+++ b/util.lua
@@ -6,6 +6,10 @@ function lua_async.yield()
coroutine.yield()
end
+function lua_async.kill_thread()
+ coroutine.yield(true)
+end
+
function lua_async.sleep(ms)
await(Promise(function(resolve)
setTimeout(resolve, ms)