aboutsummaryrefslogtreecommitdiffstats
path: root/util/async.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-03-23 21:18:15 +0100
committerKim Alvefur <zash@zash.se>2018-03-23 21:18:15 +0100
commit4872683a4207ad04e2adc611687dea3c7f729dc6 (patch)
tree44ff62ca6b47b65e3399564c5c4f4fe5cecfe5ea /util/async.lua
parentfdcc458ff81cf531cb3ed593b7027651609b4a3b (diff)
downloadprosody-4872683a4207ad04e2adc611687dea3c7f729dc6.tar.gz
prosody-4872683a4207ad04e2adc611687dea3c7f729dc6.zip
util.timer: Move sleep() here from util.async
This is to solve a indirect dependency issue where net.server was initialized before the config was read
Diffstat (limited to 'util/async.lua')
-rw-r--r--util/async.lua8
1 files changed, 0 insertions, 8 deletions
diff --git a/util/async.lua b/util/async.lua
index 8b92c878..012cfd87 100644
--- a/util/async.lua
+++ b/util/async.lua
@@ -1,6 +1,5 @@
local log = require "util.logger".init("util.async");
local new_id = require "util.id".short;
-local timer = require "util.timer";
local function checkthread()
local thread, main = coroutine.running();
@@ -226,16 +225,9 @@ local function ready()
return pcall(checkthread);
end
-local function sleep(s)
- local wait, done = waiter();
- timer.add_task(s, done);
- wait();
-end
-
return {
ready = ready;
waiter = waiter;
guarder = guarder;
runner = runner;
- sleep = sleep;
};