Skip to content

Commit

Permalink
Make it merely a warning for the precompile workload to fail (#562)
Browse files Browse the repository at this point in the history
  • Loading branch information
oxinabox authored Apr 9, 2024
1 parent aecb743 commit 108391a
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions src/Cthulhu.jl
Original file line number Diff line number Diff line change
Expand Up @@ -876,13 +876,17 @@ ascend

using PrecompileTools
@setup_workload begin
input = Base.link_pipe!(Pipe(), reader_supports_async=true, writer_supports_async=true)
term = REPL.Terminals.TTYTerminal("dumb", input.out, devnull, devnull)
write(input.in, 'q')
@compile_workload begin
descend(gcd, (Int, Int); terminal=term)
# declare we are done with streams
close(input.in)
try
input = Base.link_pipe!(Pipe(), reader_supports_async=true, writer_supports_async=true)
term = REPL.Terminals.TTYTerminal("dumb", input.out, devnull, devnull)
write(input.in, 'q')
@compile_workload begin
descend(gcd, (Int, Int); terminal=term)
# declare we are done with streams
close(input.in)
end
catch err
@error "Errorred while running the precompile workload, the package may or may not work but latency will be long" exeption=(err,catch_backtrace())
end
end

Expand Down

0 comments on commit 108391a

Please sign in to comment.