# HG changeset patch # User Matthew Wild # Date 1521220283 0 # Node ID ce5b16e135738c86e1717bab23da8b0158693fbf # Parent 96f20cf92b84e32420dc70dc4ee03438a09a1694 util.async: Log warning when unexpected state is reached diff -r 96f20cf92b84 -r ce5b16e13573 util/async.lua --- a/util/async.lua Fri Mar 16 14:59:41 2018 +0000 +++ b/util/async.lua Fri Mar 16 17:11:23 2018 +0000 @@ -12,6 +12,7 @@ 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);