Software /
code /
prosody
Changeset
9177:83e7ad5818d3
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.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 12 Aug 2018 23:52:39 +0200 (2018-08-12) |
parents | 9176:1068f9b82e2b |
children | 9178:f226b7b5486b |
files | util/async.lua |
diffstat | 1 files changed, 0 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/util/async.lua Sun Aug 12 11:43:38 2018 +0100 +++ b/util/async.lua Sun Aug 12 23:52:39 2018 +0200 @@ -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 @@ 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; };