Skip to content

Commit

Permalink
Fix redefine of local job every loop in worker
Browse files Browse the repository at this point in the history
  • Loading branch information
mafredri committed Oct 23, 2020
1 parent bf25cd8 commit 55fdc08
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions async.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 55fdc08

Please sign in to comment.