From 2fbef935f9e7f7500376969c92655ae7a0897fe2 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Sat, 17 Mar 2018 17:28:07 +0000 Subject: util.async: ensure change in e77b37de482e applies after out-of-loop resume also --- util/async.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'util') diff --git a/util/async.lua b/util/async.lua index 8756c81a..9189e6d1 100644 --- a/util/async.lua +++ b/util/async.lua @@ -32,8 +32,7 @@ local function runner_continue(thread) if error_handler then error_handler(runner, debug.traceback(thread, err)); end local ready_handler = runner.watchers.ready; runner.state, runner.thread = "ready", nil; - if ready_handler then ready_handler(runner); end - runner.notified_state = "ready"; + return runner:run(); elseif state == "ready" then -- If state is 'ready', it is our responsibility to update runner.state from 'waiting'. -- We also have to :run(), because the queue might have further items that will not be -- cgit v1.2.3