util.async: waiter: Throw error if done() called too many times

remotes/origin/0.11
Kim Alvefur 13 years ago
parent 516179867e
commit 0e702abb1f
  1. 2
      util/async.lua

@ -37,6 +37,8 @@ local function waiter(num)
num = num - 1;
if num == 0 and waiting then
runner_continue(thread);
elseif num < 0 then
error("done() called too many times");
end
end;
end

Loading…
Cancel
Save