aboutsummaryrefslogtreecommitdiffstats
path: root/util
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
commitbd3df4fa36552931b3a46a607365e7ae8fb70442 (patch)
treebd680ccb362413e1f653a1d4f4ae89db6192b70e /util
parent6105bc5d3481d55e5d7d08655270b22b154b5089 (diff)
downloadprosody-bd3df4fa36552931b3a46a607365e7ae8fb70442.tar.gz
prosody-bd3df4fa36552931b3a46a607365e7ae8fb70442.zip
util.async: Remove async.once(), can now be replaced by runner():run(func)
Diffstat (limited to 'util')
-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);