aboutsummaryrefslogtreecommitdiffstats
path: root/util/async.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2018-03-23 14:22:01 +0000
committerMatthew Wild <mwild1@gmail.com>2018-03-23 14:22:01 +0000
commit072c04815b67ca8f184e83b73ceea2f106853e24 (patch)
treebd680ccb362413e1f653a1d4f4ae89db6192b70e /util/async.lua
parent59e03259d1126b6c0bb3a2c2cdea4f967bb23bd8 (diff)
downloadprosody-072c04815b67ca8f184e83b73ceea2f106853e24.tar.gz
prosody-072c04815b67ca8f184e83b73ceea2f106853e24.zip
util.async: Remove async.once(), can now be replaced by runner():run(func)
Diffstat (limited to 'util/async.lua')
-rw-r--r--util/async.lua14
1 files changed, 0 insertions, 14 deletions
diff --git a/util/async.lua b/util/async.lua
index 9456874d..52d2c99c 100644
--- a/util/async.lua
+++ b/util/async.lua
@@ -226,20 +226,6 @@ local function ready()
return pcall(checkthread);
end
-local once; -- forward declaration
-do
- local once_watchers = {
- error = function (_, err)
- error(err);
- end;
- };
- local function once_runner(func) func(); end
- function once(func)
- local r = runner(once_runner, once_watchers);
- return r:run(func);
- end
-end
-
local function sleep(s)
local wait, done = waiter();
timer.add_task(s, done);