From a19c168d25b5980b4cf33777684405a74511b934 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Fri, 16 Mar 2018 17:11:23 +0000 Subject: util.async: Log warning when unexpected state is reached --- util/async.lua | 1 + 1 file changed, 1 insertion(+) (limited to 'util') diff --git a/util/async.lua b/util/async.lua index 3934691b..eac74c1d 100644 --- a/util/async.lua +++ b/util/async.lua @@ -12,6 +12,7 @@ end local function runner_continue(thread) -- ASSUMPTION: runner is in 'waiting' state (but we don't have the runner to know for sure) if coroutine.status(thread) ~= "suspended" then -- This should suffice + log("warn", "unexpected async state: thread not suspended"); return false; end local ok, state, runner = coroutine.resume(thread); -- cgit v1.2.3