aboutsummaryrefslogtreecommitdiffstats
path: root/util/async.lua
diff options
context:
space:
mode:
Diffstat (limited to 'util/async.lua')
-rw-r--r--util/async.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/util/async.lua b/util/async.lua
index 374a3bdf..1930d1a9 100644
--- a/util/async.lua
+++ b/util/async.lua
@@ -215,4 +215,8 @@ function runner_mt:log(level, fmt, ...)
return log(level, "[runner %s] "..fmt, self.id, ...);
end
-return { waiter = waiter, guarder = guarder, runner = runner };
+local function ready()
+ return pcall(checkthread);
+end
+
+return { ready = ready, waiter = waiter, guarder = guarder, runner = runner };