R Under development (unstable) (2025-06-05 r88281 ucrt) -- "Unsuffered Consequences" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > source("incl/start.R") Loading required package: parallelly Loading required package: future > > message("*** BatchtoolsFuture() and garbage collection ...") *** BatchtoolsFuture() and garbage collection ... > > plan(batchtools_local) > > for (how in c("resolve", "value")) { + f <- future({ 1 }) + + if (how == "value") { + v <- value(f) + print(v) + } else if (how == "resolve") { + resolve(f) + } + + stopifnot(resolved(f)) + + reg <- f$config$reg + + ## Force removal of batchtools registry files + rm(list = "f") + gc() + + ## Assert removal of files only happens if there was not + ## a failure and option future.delete is not TRUE. + stopifnot(!file_test("-d", reg$file.dir)) + fail <- try(checkIds(reg, ids = 1L), silent = TRUE) + stopifnot(inherits(fail, "try-error")) + } ## for (how ...) [04:36:45.291] Launched future #1 [04:36:47.460] Launched future #1 [1] 1 > > > message("*** BatchtoolsFuture() and garbage collection ... DONE") *** BatchtoolsFuture() and garbage collection ... DONE > > source("incl/end.R") > > proc.time() user system elapsed 1.34 0.42 4.96