Skip to content

Commit

Permalink
Use istaskfailed instead of errormonitor
Browse files Browse the repository at this point in the history
  • Loading branch information
petvana committed Dec 28, 2022
1 parent 79bee80 commit 68d4ee3
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions contrib/generate_precompile.jl
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ let
lock(print_lk) do
isempty(args) || push!(status, args...)
t1, t2, t3, t4 = (get(status, x, "") for x in ["step1", "repl", "step2", "execute"])
print("\rCollect (normal($t1), REPL $t2 ($t3)) => Execute $t4")
print("\rCollect (normal ($t1), REPL $t2 ($t3)) => Execute $t4")
end
end
end
Expand Down Expand Up @@ -396,7 +396,6 @@ function generate_precompile_statements()
close(statements_step2)
print_state("step2" => "F,$n_step2")
end
#errormonitor(step2)
!PARALLEL_PRECOMPILATION && wait(step2)

# Create a staging area where all the loaded packages are available
Expand Down Expand Up @@ -457,8 +456,10 @@ function generate_precompile_statements()
n_succeeded > 1200 || @warn "Only $n_succeeded precompile statements"
end

PARALLEL_PRECOMPILATION && wait(step1)
PARALLEL_PRECOMPILATION && wait(step2)
wait(step1)
istaskfailed(step1) && throw("Step 1 of collecting precompiles failed.")
wait(step2)
istaskfailed(step2) && throw("Step 2 of collecting precompiles failed.")

tot_time = time_ns() - start_time
println("Precompilation complete. Summary:")
Expand Down

0 comments on commit 68d4ee3

Please sign in to comment.