util/async.lua
changeset 8658 ba6a6a04b46c
parent 8654 1b7c5933b215
child 8672 2aa85b0cd2b8
--- a/util/async.lua	Thu Mar 22 16:25:20 2018 +0000
+++ b/util/async.lua	Thu Mar 22 16:26:09 2018 +0000
@@ -84,7 +84,9 @@
 
 local function guarder()
 	local guards = {};
+	local default_id = {};
 	return function (id, func)
+		id = id or default_id;
 		local thread = checkthread();
 		local guard = guards[id];
 		if not guard then