aboutsummaryrefslogtreecommitdiffstats
path: root/util/async.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2020-06-13 08:01:57 +0100
committerMatthew Wild <mwild1@gmail.com>2020-06-13 08:01:57 +0100
commit9691969c448cd101a3ac55e9a833097fcb879065 (patch)
treee9a76e1006cd08210b4e9a3b42c266dc455b0f42 /util/async.lua
parentf2dbf366426578b2ba233168f8e09cbca0ceec59 (diff)
downloadprosody-9691969c448cd101a3ac55e9a833097fcb879065.tar.gz
prosody-9691969c448cd101a3ac55e9a833097fcb879065.zip
util.async: Rename wait -> wait_for (w/compat)
Agreed this name is clearer and wait_for(thing) reads well in code.
Diffstat (limited to 'util/async.lua')
-rw-r--r--util/async.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/util/async.lua b/util/async.lua
index d338071f..16dce200 100644
--- a/util/async.lua
+++ b/util/async.lua
@@ -246,7 +246,7 @@ local function ready()
return pcall(checkthread);
end
-local function wait(promise)
+local function wait_for(promise)
local async_wait, async_done = waiter();
local ret, err = nil, nil;
promise:next(
@@ -266,5 +266,6 @@ return {
waiter = waiter;
guarder = guarder;
runner = runner;
- wait = wait;
+ wait = wait_for; -- COMPAT w/trunk pre-0.12
+ wait_for = wait_for;
};