util.async: Make functions local
authorMatthew Wild <mwild1@gmail.com>
Mon, 12 Aug 2013 10:27:08 +0100
changeset 5790 959163e4d631
parent 5789 3b05a86631b9
child 5791 2c98061b6b1e
util.async: Make functions local
util/async.lua
--- 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);