Software /
code /
prosody
Changeset
5790:959163e4d631
util.async: Make functions local
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Mon, 12 Aug 2013 10:27:08 +0100 |
parents | 5789:3b05a86631b9 |
children | 5791:2c98061b6b1e |
files | util/async.lua |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/util/async.lua Sun Aug 11 14:46:27 2013 +0100 +++ b/util/async.lua Mon Aug 12 10:27:08 2013 +0100 @@ -22,7 +22,7 @@ return true; end -function waiter(num) +local function waiter(num) local thread = coroutine.running(); if not thread then error("Not running in an async context, see http://prosody.im/doc/developers/async"); @@ -54,7 +54,7 @@ end local empty_watchers = {}; -function runner(func, watchers, data) +local function runner(func, watchers, data) return setmetatable({ func = func, thread = false, state = "ready", notified_state = "ready", queue = {}, watchers = watchers or empty_watchers, data = data } , runner_mt);