Skip to content

Commit

Permalink
Use fetch instead of errormonitor
Browse files Browse the repository at this point in the history
  • Loading branch information
petvana committed Dec 28, 2022
1 parent 68d4ee3 commit 03b9cc6
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions contrib/generate_precompile.jl
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,8 @@ function generate_precompile_statements()
end
close(statements_step1)
print_state("step1" => "F,$n_step1")
return :ok
end
#errormonitor(step1)
!PARALLEL_PRECOMPILATION && wait(step1)

step2 = @async mktemp() do precompile_file, precompile_file_h
Expand Down Expand Up @@ -395,6 +395,7 @@ function generate_precompile_statements()
end
close(statements_step2)
print_state("step2" => "F,$n_step2")
return :ok
end
!PARALLEL_PRECOMPILATION && wait(step2)

Expand Down Expand Up @@ -456,10 +457,8 @@ function generate_precompile_statements()
n_succeeded > 1200 || @warn "Only $n_succeeded precompile statements"
end

wait(step1)
istaskfailed(step1) && throw("Step 1 of collecting precompiles failed.")
wait(step2)
istaskfailed(step2) && throw("Step 2 of collecting precompiles failed.")
fetch(step1) == :ok || throw("Step 1 of collecting precompiles failed.")
fetch(step2) == :ok || throw("Step 2 of collecting precompiles failed.")

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

0 comments on commit 03b9cc6

Please sign in to comment.