aboutsummaryrefslogtreecommitdiffstats
path: root/util/async.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-08-12 23:52:39 +0200
committerKim Alvefur <zash@zash.se>2018-08-12 23:52:39 +0200
commitb5894221305f192e7eba1e8667455eb70c640c6e (patch)
treee57a3e51dbaa401aad2253517576e231691dbc2f /util/async.lua
parentdf84af2447cc2648647f94b3a9fd043c4e2da9c2 (diff)
downloadprosody-b5894221305f192e7eba1e8667455eb70c640c6e.tar.gz
prosody-b5894221305f192e7eba1e8667455eb70c640c6e.zip
util.async: Remove sleep function
Dependency on util.timer indirectly caused net.server to be initialized before the config was read, so server_select was always chosen.
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 d1d78fa5..4d9f159f 100644
--- a/util/async.lua
+++ b/util/async.lua
@@ -1,6 +1,5 @@
local logger = require "util.logger";
local log = logger.init("util.async");
-local timer = require "util.timer";
local new_id = require "util.id".short;
local function checkthread()
@@ -246,16 +245,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;
};