From df81676c778b630b931659f6cc5e366e39efa50f Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Mon, 12 Aug 2013 10:27:08 +0100 Subject: util.async: Make functions local --- util/async.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'util') diff --git a/util/async.lua b/util/async.lua index 9036a876..59d3c6f2 100644 --- a/util/async.lua +++ b/util/async.lua @@ -22,7 +22,7 @@ local function runner_continue(thread) 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 @@ local function runner_create_thread(func, self) 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); -- cgit v1.2.3