From 55fdc088fa43ff71c9e9320f176b0ad789095e5b Mon Sep 17 00:00:00 2001 From: Mathias Fredriksson Date: Fri, 23 Oct 2020 17:38:09 +0300 Subject: [PATCH] Fix redefine of local job every loop in worker --- async.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/async.zsh b/async.zsh index e5646f8..8e2c8c9 100644 --- a/async.zsh +++ b/async.zsh @@ -207,7 +207,7 @@ _async_worker() { trap close_idle_coproc CHLD # Reinstall child trap. } - local request do_eval=0 + local request job do_eval=0 local -a cmd while :; do # Wait for jobs sent by async_job. @@ -242,7 +242,7 @@ _async_worker() { cmd=("${(z)request}") # Name of the job (first argument). - local job=$cmd[1] + job=$cmd[1] # Check if a worker should perform unique jobs, unless # this is an eval since they run synchronously.