File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -470,18 +470,18 @@ function temp_cleanup_later(path::AbstractString; asap::Bool=false)
470
470
# still be using the path, don't delete it until process exit
471
471
TEMP_CLEANUP[path] = get (TEMP_CLEANUP, path, true ) & asap
472
472
if length (TEMP_CLEANUP) > TEMP_CLEANUP_MAX[]
473
- temp_cleanup_purge (false )
473
+ temp_cleanup_purge ()
474
474
TEMP_CLEANUP_MAX[] = max (TEMP_CLEANUP_MIN[], 2 * length (TEMP_CLEANUP))
475
475
end
476
476
unlock (TEMP_CLEANUP_LOCK)
477
477
return nothing
478
478
end
479
479
480
- function temp_cleanup_purge (all :: Bool = true )
480
+ function temp_cleanup_purge (; force :: Bool = false )
481
481
need_gc = Sys. iswindows ()
482
482
for (path, asap) in TEMP_CLEANUP
483
483
try
484
- if (all || asap) && ispath (path)
484
+ if (force || asap) && ispath (path)
485
485
need_gc && GC. gc (true )
486
486
need_gc = false
487
487
rm (path, recursive= true , force= true )
Original file line number Diff line number Diff line change 293
293
294
294
# # atexit: register exit hooks ##
295
295
296
- const atexit_hooks = Callable[Filesystem. temp_cleanup_purge]
296
+ const atexit_hooks = Callable[
297
+ () -> Filesystem. temp_cleanup_purge (force= true )
298
+ ]
297
299
298
300
"""
299
301
atexit(f)
You can’t perform that action at this time.
0 commit comments