From e3fd2037fc259390a431bf80521f8c7ac1976885 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Thu, 22 Mar 2018 16:26:09 +0000 Subject: util.async: Allow nil as a guard key --- util/async.lua | 2 ++ 1 file changed, 2 insertions(+) (limited to 'util') diff --git a/util/async.lua b/util/async.lua index 7a8bd686..e8469e51 100644 --- a/util/async.lua +++ b/util/async.lua @@ -84,7 +84,9 @@ end 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 -- cgit v1.2.3