Skip to content

Commit 4e237fd

Browse files
fix trailing downloads task
1 parent 89025eb commit 4e237fd

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/PlatformEngines.jl

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,8 +281,16 @@ function download(
281281
else
282282
(total, now) -> nothing
283283
end
284+
# During precompilation don't use the default downloader as it has a
285+
# 30s grace period that will cause the pending process warning on 1.10
286+
# (on 1.11 the downloader is finalized before the pending process detector)
287+
downloader = if ccall(:jl_generating_output, Cint, ()) != 0
288+
Downloads.Downloader(grace=0)
289+
else
290+
nothing
291+
end
284292
try
285-
Downloads.download(url, dest; headers, progress)
293+
Downloads.download(url, dest; headers, progress, downloader=downloader)
286294
finally
287295
do_fancy && end_progress(io, bar)
288296
end

0 commit comments

Comments
 (0)