I use PrecompileTools everywhere I can.
Some times the precompilation takes a very long time (think 10 minutes) in a way that’s unreasonable. I wait, and then when it eventually ends I get a long list of warnings with things like:
│ [pid 185191] waiting for IO to finish:
│ Handle type uv_handle_t->data
│ tcp[11] 0x33cf0390->0x7f179f370560
│ tcp[18] 0x344c5e40->0x7f1787494560
│ tcp[19] 0x341abd90->0x7f179cad25e0 │ tcp[20] 0x35150390->0x7f17868846f0
│ tcp[21] 0x33ba32b0->0x7f179cb90f60
│ tcp[22] 0x34ceebd0->0x7f1788dbf670
│ tcp[23] 0x34a68a90->0x7f179cfccd80
│ This means that a package has started a background task or event source that has not finished running. For precompilation to complete suc
cessfully, the event source needs to be closed explicitly. See the developer documentation on fixing precompilation hangs for more help.
To me it seems that this happens when I’ve put some HTTP.get external calls inside PrecompileTools.@compile_workload (Think make a call, and then parse the response).
I believe that the docs that the warning refers to are these here [1]. And as suggested on that link, HTTP.jl does use Timer [2] though it’s used in WebSockets, not in HTTP.get.
Is this known to be a bad idea? Am I using PrecompileTools wrong? How would I go about fixing the problem so I can keep precompiling these external calls?
[1] Fixing precompilation hangs due to open tasks or IO · Julia 中文文档
[2] HTTP.jl/src/WebSockets.jl at e7feb99bf1d4165c7e3e28171eefeb7652ec2773 · JuliaWeb/HTTP.jl · GitHub