Skip to content

Commit

Permalink
add pending job
Browse files Browse the repository at this point in the history
  • Loading branch information
waruqi committed Jun 4, 2024
1 parent 195ca73 commit fce9aa8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion xmake/modules/async/runjobs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ function main(name, jobs, opt)
local abort = false
local abort_errors
local progress_wrapper = {}
local job_pending
progress_wrapper.current = function ()
return count
end
Expand Down Expand Up @@ -193,7 +194,7 @@ function main(name, jobs, opt)
if not jobs_cb then

-- get free job
job = jobs:getfree()
job = job_pending and job_pending or jobs:getfree()
if not job then
break
end
Expand All @@ -203,13 +204,15 @@ function main(name, jobs, opt)
if job.distcc then
distccjob = true
else
job_pending = job
break
end
end

-- get run function
jobfunc = job.run
jobname = job.name
job_pending = nil
else
jobname = tostring(index)
end
Expand Down

0 comments on commit fce9aa8

Please sign in to comment.