Running 'BatchtoolsFuture,gc.R' [4s]
  Running 'BatchtoolsFuture.R' [171s]
  Running 'BatchtoolsFutureError.R' [9s]
  Running 'batchtools_custom.R' [168s]
  Running 'batchtools_hpc.R' [1s]
  Running 'batchtools_interactive.R' [173s]
  Running 'batchtools_local.R' [7s]
  Running 'batchtools_multicore.R' [12s]
  Running 'batchtools_ssh.R' [1s]
  Running 'batchtools_template.R' [1s]
  Running 'demo.R' [162s]
  Running 'dotdotdot.R' [7s]
  Running 'future,labels.R' [154s]
  Running 'future,lazy.R' [4s]
  Running 'globals,formulas.R' [14s]
  Running 'globals,manual.R' [10s]
  Running 'globals,subassignment.R' [11s]
  Running 'globals,tricky.R' [12s]
  Running 'nbrOfWorkers.R' [1s]
  Running 'plan.R' [4s]
  Running 'resources_OP.R' [153s]
  Running 'rng.R' [167s]
  Running 'stdout.R' [8s]
  Running 'utils.R' [1s]
  Running 'zzz,future_lapply.R' [193s]
  Running 'zzz.onUnload.R' [173s]
Running the tests in 'tests/BatchtoolsFuture.R' failed.
Complete output:
  > source("incl/start.R")
  Loading required package: parallelly
  Loading required package: future
  > 
  > message("*** BatchtoolsFuture() ...")
  *** BatchtoolsFuture() ...
  > 
  > message("*** BatchtoolsFuture() - cleanup ...")
  *** BatchtoolsFuture() - cleanup ...
  > 
  > f <- batchtools_local({ 1L })
  > res <- await(f, cleanup = TRUE)
  > print(res)
  FutureResult:
  value: 'integer'
  visible: TRUE
  stdout: character
  conditions: [n = 0] 
  RNG used: FALSE
  duration: 0.0418222 secs (started 2024-03-23 14:25:24.520429)
  version: 1.8
  > stopifnot(res$value == 1L)
  > 
  > message("*** BatchtoolsFuture() - cleanup ... DONE")
  *** BatchtoolsFuture() - cleanup ... DONE
  > 
  > 
  > message("*** BatchtoolsFuture() - deleting exceptions ...")
  *** BatchtoolsFuture() - deleting exceptions ...
  > 
  > ## Printing a deleted future
  > f <- batchtools_local(42L)
  > print(f)
  BatchtoolsLocalFuture:
  Label: '<none>'
  Expression:
  [1] 42
  Lazy evaluation: FALSE
  Asynchronous evaluation: TRUE
  Local evaluation: TRUE
  Environment: R_GlobalEnv
  Capture standard output: TRUE
  Capture condition classes: 'condition' (excluding 'nothing')
  Globals: <none>
  Packages: <none>
  L'Ecuyer-CMRG RNG seed: <none> (seed = FALSE)
  Resolved: TRUE
  Value: <not collected>
  Conditions captured: <none>
  Early signaling: FALSE
  Owner process: b4e653b6-2242-9872-09d7-f3198af8d3e7
  Class: 'BatchtoolsLocalFuture', 'BatchtoolsUniprocessFuture', 'BatchtoolsFuture', 'Future', 'environment'
  batchtools configuration file: 'D:/RCompile/CRANpkg/lib/4.4/future.batchtools/templates-for-R_CMD_check/batchtools.conf.R' (82 bytes; 1 lines)
  batchtools cluster functions: 'Interactive'
  batchtools cluster functions template: <NA>
  batchtools status: 'defined', 'finished', 'started', 'submitted'
  batchtools Registry:
    File dir exists: TRUE
    Work dir exists: TRUE
  Job Registry
    Backend  : Interactive
    File dir : D:/temp/RtmpyCRiAm/.future/20240323_142523-yCRiAm/batchtools_851433721
    Work dir : D:/Rcompile/CRANpkg/local/4.4/future.batchtools.Rcheck/tests
    Jobs     : 1
    Seed     : 18260
    Writeable: TRUE
  > v <- value(f)
  > print(v)
  [1] 42
  > stopifnot(v == 42L)
  > res <- delete(f)
  > print(f)
  BatchtoolsLocalFuture:
  Label: '<none>'
  Expression:
  [1] 42
  Lazy evaluation: FALSE
  Asynchronous evaluation: TRUE
  Local evaluation: TRUE
  Environment: R_GlobalEnv
  Capture standard output: TRUE
  Capture condition classes: 'condition' (excluding 'nothing')
  Globals: <none>
  Packages: <none>
  L'Ecuyer-CMRG RNG seed: <none> (seed = FALSE)
  Resolved: TRUE
  Value: 56 bytes of class 'integer'
  Early signaling: FALSE
  Owner process: b4e653b6-2242-9872-09d7-f3198af8d3e7
  Class: 'BatchtoolsLocalFuture', 'BatchtoolsUniprocessFuture', 'BatchtoolsFuture', 'Future', 'environment'
  batchtools configuration file: 'D:/RCompile/CRANpkg/lib/4.4/future.batchtools/templates-for-R_CMD_check/batchtools.conf.R' (82 bytes; 1 lines)
  batchtools cluster functions: 'Interactive'
  batchtools cluster functions template: <NA>
  batchtools status: 'defined', 'finished', 'started', 'submitted'
  batchtools Registry:
    File dir exists: FALSE
    Work dir exists: TRUE
  Job Registry
    Backend  : Interactive
    File dir : D:/temp/RtmpyCRiAm/.future/20240323_142523-yCRiAm/batchtools_851433721
    Work dir : D:/Rcompile/CRANpkg/local/4.4/future.batchtools.Rcheck/tests
    Jobs     : 1
    Seed     : 18260
    Writeable: TRUE
  > res <- delete(f)
  > print(f)
  BatchtoolsLocalFuture:
  Label: '<none>'
  Expression:
  [1] 42
  Lazy evaluation: FALSE
  Asynchronous evaluation: TRUE
  Local evaluation: TRUE
  Environment: R_GlobalEnv
  Capture standard output: TRUE
  Capture condition classes: 'condition' (excluding 'nothing')
  Globals: <none>
  Packages: <none>
  L'Ecuyer-CMRG RNG seed: <none> (seed = FALSE)
  Resolved: TRUE
  Value: 56 bytes of class 'integer'
  Early signaling: FALSE
  Owner process: b4e653b6-2242-9872-09d7-f3198af8d3e7
  Class: 'BatchtoolsLocalFuture', 'BatchtoolsUniprocessFuture', 'BatchtoolsFuture', 'Future', 'environment'
  batchtools configuration file: 'D:/RCompile/CRANpkg/lib/4.4/future.batchtools/templates-for-R_CMD_check/batchtools.conf.R' (82 bytes; 1 lines)
  batchtools cluster functions: 'Interactive'
  batchtools cluster functions template: <NA>
  batchtools status: 'defined', 'finished', 'started', 'submitted'
  batchtools Registry:
    File dir exists: FALSE
    Work dir exists: TRUE
  Job Registry
    Backend  : Interactive
    File dir : D:/temp/RtmpyCRiAm/.future/20240323_142523-yCRiAm/batchtools_851433721
    Work dir : D:/Rcompile/CRANpkg/local/4.4/future.batchtools.Rcheck/tests
    Jobs     : 1
    Seed     : 18260
    Writeable: TRUE
  > 
  > message("*** BatchtoolsFuture() - deleting exceptions ... DONE")
  *** BatchtoolsFuture() - deleting exceptions ... DONE
  > 
  > 
  > message("*** BatchtoolsFuture() - registry exceptions ...")
  *** BatchtoolsFuture() - registry exceptions ...
  > 
  > ## Non-existing batchtools registry
  > f <- BatchtoolsFuture({ x <- 1 })
  > 
  > ## Hack to emulate where batchtools registry is deleted or fails
  > f$state <- "running"
  > if (!is.null(f$config$reg)) {
  +   path <- f$config$reg$file.dir
  +   unlink(path, recursive = TRUE)
  + }
  > 
  > res <- tryCatch({
  +   value(f)
  + }, error = function(ex) ex)
  > print(res)
  <simpleError: The result no longer exists (or never existed) for Future ('<none>') of class 'BatchtoolsFuture', 'Future', 'environment'>
  > stopifnot(inherits(res, "error"))
  > 
  > res <- tryCatch({
  +   await(f)
  + }, error = function(ex) ex)
  > print(res)
  <simpleError: 'inherits(reg, "Registry")' is not TRUE>
  > stopifnot(inherits(res, "error"))
  > 
  > 
  > message("*** BatchtoolsFuture() - registry exceptions ... DONE")
  *** BatchtoolsFuture() - registry exceptions ... DONE
  > 
  > message("*** BatchtoolsFuture() - exceptions ...")
  *** BatchtoolsFuture() - exceptions ...
  > 
  > res <- try(f <- BatchtoolsFuture(42L, workers = integer(0)), silent = TRUE)
  > print(res)
  [1] "Error : 'length(workers) >= 1' is not TRUE\n"
  attr(,"class")
  [1] "try-error"
  attr(,"condition")
  <simpleError: 'length(workers) >= 1' is not TRUE>
  > stopifnot(inherits(res, "try-error"))
  > 
  > res <- try(f <- BatchtoolsFuture(42L, workers = 0L), silent = TRUE)
  > print(res)
  [1] "Error : 'workers >= 1' is not TRUE\n"
  attr(,"class")
  [1] "try-error"
  attr(,"condition")
  <simpleError: 'workers >= 1' is not TRUE>
  > stopifnot(inherits(res, "try-error"))
  > 
  > res <- try(f <- BatchtoolsFuture(42L, workers = TRUE), silent = TRUE)
  > print(res)
  [1] "Error in as_BatchtoolsFuture(future, resources = resources, workers = workers,  : \n  Argument 'workers' should be either a numeric or a function: logical\n"
  attr(,"class")
  [1] "try-error"
  attr(,"condition")
  <simpleError in as_BatchtoolsFuture(future, resources = resources, workers = workers,     finalize = finalize, conf.file = conf.file, cluster.functions = cluster.functions,     registry = registry): Argument 'workers' should be either a numeric or a function: logical>
  > stopifnot(inherits(res, "try-error"))
  > 
  > message("*** BatchtoolsFuture() - exceptions ... DONE")
  *** BatchtoolsFuture() - exceptions ... DONE
  > 
  > 
  > message("*** BatchtoolsFuture() - timeout ...")
  *** BatchtoolsFuture() - timeout ...
  > 
  > if (fullTest && availableCores(constraints = "multicore") > 1) {
  +   plan(batchtools_multicore)
  + 
  +   options(future.wait.timeout = 0.15, future.wait.interval = 0.1)
  + 
  +   f <- future({
  +     Sys.sleep(5)
  +     x <- 1
  +   })
  + 
  +   res <- tryCatch({
  +     value(f)
  +   }, error = function(ex) ex)
  +   stopifnot(inherits(res, "error"))
  + }
  > 
  > 
  > message("*** BatchtoolsFuture() - timeout ... DONE")
  *** BatchtoolsFuture() - timeout ... DONE
  > 
  > 
  > 
  > message("*** BatchtoolsFuture() ... DONE")
  *** BatchtoolsFuture() ... DONE
  > 
  > source("incl/end.R")
  > 
  > proc.time()
     user  system elapsed 
     1.28    0.23    3.57 
Running the tests in 'tests/batchtools_custom.R' failed.
Complete output:
  > source("incl/start.R")
  Loading required package: parallelly
  Loading required package: future
  > library("batchtools")
  > library("listenv")
  > 
  > message("*** batchtools_custom() ...")
  *** batchtools_custom() ...
  > 
  > message("*** batchtools_custom() w/ 'conf.file' on R_BATCHTOOLS_SEARCH_PATH")
  *** batchtools_custom() w/ 'conf.file' on R_BATCHTOOLS_SEARCH_PATH
  > 
  > f <- batchtools_custom({
  +   42L
  + })
  > print(f)
  BatchtoolsCustomFuture:
  Label: '<none>'
  Expression:
  {
      42L
  }
  Lazy evaluation: FALSE
  Asynchronous evaluation: TRUE
  Local evaluation: TRUE
  Environment: R_GlobalEnv
  Capture standard output: TRUE
  Capture condition classes: 'condition' (excluding 'nothing')
  Globals: <none>
  Packages: <none>
  L'Ecuyer-CMRG RNG seed: <none> (seed = FALSE)
  Resolved: TRUE
  Value: <not collected>
  Conditions captured: <none>
  Early signaling: FALSE
  Owner process: 7fd46e49-c305-4ed7-f171-4c1e7334a45a
  Class: 'BatchtoolsCustomFuture', 'BatchtoolsFuture', 'Future', 'environment'
  batchtools configuration file: 'D:/RCompile/CRANpkg/lib/4.4/future.batchtools/templates-for-R_CMD_check/batchtools.conf.R' (82 bytes; 1 lines)
  batchtools cluster functions: 'Interactive'
  batchtools cluster functions template: <NA>
  batchtools status: 'defined', 'finished', 'started', 'submitted'
  batchtools Registry:
    File dir exists: TRUE
    Work dir exists: TRUE
  Job Registry
    Backend  : Interactive
    File dir : D:/temp/RtmpwfpR5D/.future/20240323_142824-wfpR5D/batchtools_959070860
    Work dir : D:/Rcompile/CRANpkg/local/4.4/future.batchtools.Rcheck/tests
    Jobs     : 1
    Seed     : 26375
    Writeable: TRUE
  > stopifnot(inherits(f, "BatchtoolsFuture"))
  > v <- value(f)
  > print(v)
  [1] 42
  > stopifnot(v == 42L)
  > 
  > 
  > message("*** batchtools_custom() w/ 'cluster.functions' without globals")
  *** batchtools_custom() w/ 'cluster.functions' without globals
  > 
  > cf <- makeClusterFunctionsInteractive(external = TRUE)
  > str(cf)
  List of 11
   $ name                : chr "Interactive"
   $ submitJob           :function (reg, jc)  
   $ killJob             : NULL
   $ listJobsQueued      : NULL
   $ listJobsRunning     : NULL
   $ array.var           : chr NA
   $ store.job.collection: logi TRUE
   $ store.job.files     : logi FALSE
   $ scheduler.latency   : num 0
   $ fs.latency          : num 0
   $ hooks               : list()
   - attr(*, "class")= chr "ClusterFunctions"
  > 
  > f <- batchtools_custom({
  +   42L
  + }, cluster.functions = cf)
  > stopifnot(inherits(f, "BatchtoolsFuture"))
  > 
  > ## Check whether a batchtools_custom future is resolved
  > ## or not will force evaluation
  > print(is_resolved <- resolved(f))
  [1] TRUE
  > stopifnot(is_resolved)
  > 
  > y <- value(f)
  > print(y)
  [1] 42
  > stopifnot(y == 42L)
  > 
  > 
  > message("*** batchtools_custom()  w/ 'cluster.functions' with globals")
  *** batchtools_custom()  w/ 'cluster.functions' with globals
  > ## A global variable
  > a <- 0
  > f <- batchtools_custom({
  +   b <- 3
  +   c <- 2
  +   a * b * c
  + }, cluster.functions = cf)
  > print(f)
  BatchtoolsCustomFuture:
  Label: '<none>'
  Expression:
  {
      b <- 3
      c <- 2
      a * b * c
  }
  Lazy evaluation: FALSE
  Asynchronous evaluation: TRUE
  Local evaluation: TRUE
  Environment: R_GlobalEnv
  Capture standard output: TRUE
  Capture condition classes: 'condition' (excluding 'nothing')
  Globals: 1 objects totaling 56 bytes (numeric 'a' of 56 bytes)
  Packages: <none>
  L'Ecuyer-CMRG RNG seed: <none> (seed = FALSE)
  Resolved: TRUE
  Value: <not collected>
  Conditions captured: <none>
  Early signaling: FALSE
  Owner process: 7fd46e49-c305-4ed7-f171-4c1e7334a45a
  Class: 'BatchtoolsCustomFuture', 'BatchtoolsFuture', 'Future', 'environment'
  batchtools configuration file: 'D:/RCompile/CRANpkg/lib/4.4/future.batchtools/templates-for-R_CMD_check/batchtools.conf.R' (82 bytes; 1 lines)
  batchtools cluster functions: 'Interactive'
  batchtools cluster functions template: <NA>
  batchtools status: 'defined', 'finished', 'started', 'submitted'
  batchtools Registry:
    File dir exists: TRUE
    Work dir exists: TRUE
  Job Registry
    Backend  : Interactive
    File dir : D:/temp/RtmpwfpR5D/.future/20240323_142824-wfpR5D/batchtools_338249542
    Work dir : D:/Rcompile/CRANpkg/local/4.4/future.batchtools.Rcheck/tests
    Jobs     : 1
    Seed     : 26091
    Writeable: TRUE
  > 
  > ## Although 'f' is a batchtools_custom future and therefore
  > ## resolved/evaluates the future expression only
  > ## when the value is requested, any global variables
  > ## identified in the expression (here 'a') are
  > ## "frozen" at the time point when the future is
  > ## created.  Because of this, 'a' preserved the
  > ## zero value although we reassign it below
  > a <- 7  ## Make sure globals are frozen
  > v <- value(f)
  > print(v)
  [1] 0
  > stopifnot(v == 0)
  > 
  > 
  > message("*** batchtools_custom()  w/ 'cluster.functions' with globals (tricky)")
  *** batchtools_custom()  w/ 'cluster.functions' with globals (tricky)
  > x <- listenv()
  > for (ii in 1:2) {
  +   x[[ii]] <- batchtools_custom({ ii }, globals = TRUE, cluster.functions = cf)
  + }
  > v <- unlist(value(x))
  > stopifnot(all(v == 1:2))  ## Make sure globals are frozen
  > 
  > 
  > message("*** batchtools_custom()  w/ 'cluster.functions' and errors")
  *** batchtools_custom()  w/ 'cluster.functions' and errors
  > f <- batchtools_custom({
  +   stop("Whoops!")
  +   1
  + }, cluster.functions = cf)
  > v <- value(f, signal = FALSE)
  Warning in delete.BatchtoolsFuture(future) :
    Will not remove batchtools registry, because the status of the batchtools was 'error', 'defined', 'finished', 'started', 'submitted' and option 'future.delete' is FALSE or running in an interactive session: 'D:/temp/RtmpwfpR5D/.future/20240323_142824-wfpR5D/batchtools_1477098905'
  > print(v)
  <simpleError in eval(quote({    stop("Whoops!")    1}), new.env()): Whoops!>
  > stopifnot(inherits(v, "simpleError"))
  > 
  > res <- try({ v <- value(f) }, silent = TRUE)
  > print(res)
  [1] "Error in eval(quote({ : Whoops!\n"
  attr(,"class")
  [1] "try-error"
  attr(,"condition")
  <simpleError in eval(quote({    stop("Whoops!")    1}), new.env()): Whoops!>
  > stopifnot(inherits(res, "try-error"))
  > 
  > ## Error is repeated
  > res <- try(value(f), silent = TRUE)
  > print(res)
  [1] "Error in eval(quote({ : Whoops!\n"
  attr(,"class")
  [1] "try-error"
  attr(,"condition")
  <simpleError in eval(quote({    stop("Whoops!")    1}), new.env()): Whoops!>
  > stopifnot(inherits(res, "try-error"))
  > 
  > message("*** batchtools_custom() ... DONE")
  *** batchtools_custom() ... DONE
  > 
  > source("incl/end.R")
  > 
  > proc.time()
     user  system elapsed 
     1.70    0.26    7.64 
Running the tests in 'tests/batchtools_interactive.R' failed.
Complete output:
  > source("incl/start.R")
  Loading required package: parallelly
  Loading required package: future
  > library("listenv")
  > 
  > message("*** batchtools_interactive() ...")
  *** batchtools_interactive() ...
  > 
  > message("*** batchtools_interactive() without globals")
  *** batchtools_interactive() without globals
  > 
  > f <- batchtools_interactive({
  +   42L
  + })
  > stopifnot(inherits(f, "BatchtoolsFuture"))
  > 
  > ## Check whether a batchtools_interactive future is resolved
  > ## or not will force evaluation
  > print(is_resolved <- resolved(f))
  [1] TRUE
  > stopifnot(is_resolved)
  > 
  > y <- value(f)
  > print(y)
  [1] 42
  > stopifnot(y == 42L)
  > 
  > 
  > message("*** batchtools_interactive() with globals")
  *** batchtools_interactive() with globals
  > ## A global variable
  > a <- 0
  > f <- batchtools_interactive({
  +   b <- 3
  +   c <- 2
  +   a * b * c
  + })
  > 
  > ## Although 'f' is a batchtools_interactive future and therefore
  > ## resolved/evaluates the future expression only
  > ## when the value is requested, any global variables
  > ## identified in the expression (here 'a') are
  > ## "frozen" at the time point when the future is
  > ## created.  Because of this, 'a' preserved the
  > ## zero value although we reassign it below
  > a <- 7  ## Make sure globals are frozen
  > v <- value(f)
  > print(v)
  [1] 0
  > stopifnot(v == 0)
  > 
  > 
  > message("*** batchtools_interactive() with globals (tricky)")
  *** batchtools_interactive() with globals (tricky)
  > x <- listenv()
  > for (ii in 1:2) x[[ii]] <- batchtools_interactive({ ii }, globals = TRUE)
  > v <- unlist(value(x))
  > stopifnot(all(v == 1:2))  ## Make sure globals are frozen
  > 
  > 
  > message("*** batchtools_interactive() and errors")
  *** batchtools_interactive() and errors
  > f <- batchtools_interactive({
  +   stop("Whoops!")
  +   1
  + })
  > v <- value(f, signal = FALSE)
  Warning in delete.BatchtoolsFuture(future) :
    Will not remove batchtools registry, because the status of the batchtools was 'error', 'defined', 'finished', 'started', 'submitted' and option 'future.delete' is FALSE or running in an interactive session: 'D:/temp/RtmpuGejlB/.future/20240323_143113-uGejlB/batchtools_1748034845'
  > print(v)
  <simpleError in eval(quote({    stop("Whoops!")    1}), new.env()): Whoops!>
  > stopifnot(inherits(v, "simpleError"))
  > 
  > res <- try({ v <- value(f) }, silent = TRUE)
  > print(res)
  [1] "Error in eval(quote({ : Whoops!\n"
  attr(,"class")
  [1] "try-error"
  attr(,"condition")
  <simpleError in eval(quote({    stop("Whoops!")    1}), new.env()): Whoops!>
  > stopifnot(inherits(res, "try-error"))
  > 
  > ## Error is repeated
  > res <- try(value(f), silent = TRUE)
  > print(res)
  [1] "Error in eval(quote({ : Whoops!\n"
  attr(,"class")
  [1] "try-error"
  attr(,"condition")
  <simpleError in eval(quote({    stop("Whoops!")    1}), new.env()): Whoops!>
  > stopifnot(inherits(res, "try-error"))
  > 
  > message("*** batchtools_interactive() ... DONE")
  *** batchtools_interactive() ... DONE
  > 
  > source("incl/end.R")
  > 
  > proc.time()
     user  system elapsed 
     1.64    0.37    2.01 
Running the tests in 'tests/demo.R' failed.
Complete output:
  > source("incl/start.R")
  Loading required package: parallelly
  Loading required package: future
  > 
  > plan(batchtools_local)
  > 
  > ## CRAN processing times:
  > ## On Windows 32-bit, don't run these tests via batchtools
  > if (!fullTest && isWin32) plan(sequential)
  > 
  > options(future.demo.mandelbrot.nrow = 2L)
  > options(future.demo.mandelbrot.resolution = 50L)
  > options(future.demo.mandelbrot.delay = FALSE)
  > 
  > message("*** Demos ...")
  *** Demos ...
  > 
  > message("*** Mandelbrot demo of the 'future' package ...")
  *** Mandelbrot demo of the 'future' package ...
  > 
  > demo("mandelbrot", package = "future", ask = FALSE)
  
  
  	demo(mandelbrot)
  	---- ~~~~~~~~~~
  
  > library("future")
  
  > library("graphics")
  
  > plot_what_is_done <- function(counts) {
  +   for (kk in seq_along(counts)) {
  +     f <- counts[[kk]]
  + 
  +     ## Already plotted?
  +     if (!inherits(f, "Future")) next
  + 
  +     ## Not resolved?
  +     if (!resolved(f)) next
  + 
  +     message(sprintf("Plotting tile #%d of %d ...", kk, n))
  +     counts[[kk]] <- value(f)
  +     screen(kk)
  +     plot(counts[[kk]])
  +   }
  + 
  +   counts
  + }
  
  > ## Options
  > region <- getOption("future.demo.mandelbrot.region", 1L)
  
  > if (!is.list(region)) {
  +   if (region == 1L) {
  +     region <- list(xmid = -0.75, ymid = 0.0, side = 3.0)
  +   } else if (region == 2L) {
  +     region <- list(xmid = 0.283, ymid = -0.0095, side = 0.00026)
  +   } else if (region == 3L) {
  +     region <- list(xmid = 0.282989, ymid = -0.01, side = 3e-8)
  +   }
  + }
  
  > nrow <- getOption("future.demo.mandelbrot.nrow", 3L)
  
  > resolution <- getOption("future.demo.mandelbrot.resolution", 400L)
  
  > delay <- getOption("future.demo.mandelbrot.delay", interactive())
  
  > if (isTRUE(delay)) {
  +   delay <- function(counts) Sys.sleep(1.0)
  + } else if (!is.function(delay)) {
  +   delay <- function(counts) {}
  + }
  
  > ## Generate Mandelbrot tiles to be computed
  > Cs <- mandelbrot_tiles(xmid = region$xmid, ymid = region$ymid,
  +                        side = region$side, nrow = nrow,
  +                        resolution = resolution)
  
  > if (interactive()) {
  +   dev.new()
  +   plot.new()
  +   split.screen(dim(Cs))
  +   for (ii in seq_along(Cs)) {
  +     screen(ii)
  +     par(mar = c(0, 0, 0, 0))
  +     text(x = 1 / 2, y = 1 / 2, sprintf("Future #%d\nunresolved", ii), cex = 2)
  +   }
  + } else {
  +   split.screen(dim(Cs))
  + }
  [1] 1 2 3 4
  
  > ## Create all Mandelbrot tiles via lazy futures
  > n <- length(Cs)
  
  > message(sprintf("Creating %d Mandelbrot tiles:", n), appendLF = FALSE)
  Creating 4 Mandelbrot tiles:
  > counts <- lapply(seq_along(Cs), FUN=function(ii) {
  +   message(" ", ii, appendLF = FALSE)
  +   C <- Cs[[ii]]
  +   future({
  +     message(sprintf("Calculating tile #%d of %d ...", ii, n), appendLF = FALSE)
  +     fit <- mandelbrot(C)
  + 
  +     ## Emulate slowness
  +     delay(fit)
  + 
  +     message(" done")
  +     fit
  +   }, lazy = TRUE)
  + })
   1 2 3 4
  > message(".")
  .
  
  > ## Calculate and plot tiles
  > repeat {
  +   counts <- plot_what_is_done(counts)
  +   if (!any(sapply(counts, FUN = inherits, "Future"))) break
  + }
  Plotting tile #1 of 4 ...
  Calculating tile #1 of 4 ... done
  Plotting tile #2 of 4 ...
  Calculating tile #2 of 4 ... done
  Plotting tile #3 of 4 ...
  Calculating tile #3 of 4 ... done
  Plotting tile #4 of 4 ...
  Calculating tile #4 of 4 ... done
  
  > close.screen()
  [1] 1 2 3 4
  
  > message("SUGGESTION: Try to rerun this demo after changing strategy for how futures are resolved, e.g. plan(multisession).\n")
  SUGGESTION: Try to rerun this demo after changing strategy for how futures are resolved, e.g. plan(multisession).
  
  > 
  > message("*** Demos ... DONE")
  *** Demos ... DONE
  > 
  > source("incl/end.R")
  > 
  > proc.time()
     user  system elapsed 
     1.59    0.37    6.28 
Running the tests in 'tests/future,labels.R' failed.
Complete output:
  > source("incl/start.R")
  Loading required package: parallelly
  Loading required package: future
  > 
  > message("*** Futures - labels ...")
  *** Futures - labels ...
  > 
  > strategies <- c("batchtools_local")
  > 
  > ## CRAN processing times:
  > ## On Windows 32-bit, don't run these tests
  > if (!fullTest && isWin32) strategies <- character(0L)
  > 
  > for (strategy in strategies) {
  +   mprintf("- plan('%s') ...\n", strategy)
  +   plan(strategy)
  + 
  +   for (label in list(NULL, sprintf("strategy_%s", strategy))) {
  +     fcn <- get(strategy, mode = "function")
  +     stopifnot(inherits(fcn, strategy))
  +     f <- fcn(42, label = label)
  +     stopifnot(identical(f$label, label))
  +     v <- value(f)
  +     stopifnot(v == 42)
  +     print(f)
  + 
  +     f <- future(42, label = label)
  +     stopifnot(identical(f$label, label))
  +     v <- value(f)
  +     stopifnot(v == 42)
  + 
  +     v %<-% { 42 } %label% label
  +     f <- futureOf(v)
  +     stopifnot(identical(f$label, label))
  +     stopifnot(v == 42)
  + 
  +   } ## for (label ...)
  + 
  +   mprintf("- plan('%s') ... DONE\n", strategy)
  + } ## for (strategy ...)
  - plan('batchtools_local') ...
  BatchtoolsLocalFuture:
  Label: '<none>'
  Expression:
  [1] 42
  Lazy evaluation: FALSE
  Asynchronous evaluation: TRUE
  Local evaluation: TRUE
  Environment: R_GlobalEnv
  Capture standard output: TRUE
  Capture condition classes: 'condition' (excluding 'nothing')
  Globals: <none>
  Packages: <none>
  L'Ecuyer-CMRG RNG seed: <none> (seed = FALSE)
  Resolved: TRUE
  Value: 56 bytes of class 'numeric'
  Early signaling: FALSE
  Owner process: 35097fc0-dfe1-f15e-051e-9cbb4d56fe8c
  Class: 'BatchtoolsLocalFuture', 'BatchtoolsUniprocessFuture', 'BatchtoolsFuture', 'Future', 'environment'
  batchtools configuration file: 'D:/RCompile/CRANpkg/lib/4.4/future.batchtools/templates-for-R_CMD_check/batchtools.conf.R' (82 bytes; 1 lines)
  batchtools cluster functions: 'Interactive'
  batchtools cluster functions template: <NA>
  batchtools status: 'defined', 'finished', 'started', 'submitted'
  batchtools Registry:
    File dir exists: FALSE
    Work dir exists: TRUE
  Job Registry
    Backend  : Interactive
    File dir : D:/temp/RtmpsvRBqM/.future/20240323_143716-svRBqM/batchtools_870795741
    Work dir : D:/Rcompile/CRANpkg/local/4.4/future.batchtools.Rcheck/tests
    Jobs     : 1
    Seed     : 21978
    Writeable: TRUE
  BatchtoolsLocalFuture:
  Label: 'strategy_batchtools_local'
  Expression:
  [1] 42
  Lazy evaluation: FALSE
  Asynchronous evaluation: TRUE
  Local evaluation: TRUE
  Environment: R_GlobalEnv
  Capture standard output: TRUE
  Capture condition classes: 'condition' (excluding 'nothing')
  Globals: <none>
  Packages: <none>
  L'Ecuyer-CMRG RNG seed: <none> (seed = FALSE)
  Resolved: TRUE
  Value: 56 bytes of class 'numeric'
  Early signaling: FALSE
  Owner process: 35097fc0-dfe1-f15e-051e-9cbb4d56fe8c
  Class: 'BatchtoolsLocalFuture', 'BatchtoolsUniprocessFuture', 'BatchtoolsFuture', 'Future', 'environment'
  batchtools configuration file: 'D:/RCompile/CRANpkg/lib/4.4/future.batchtools/templates-for-R_CMD_check/batchtools.conf.R' (82 bytes; 1 lines)
  batchtools cluster functions: 'Interactive'
  batchtools cluster functions template: <NA>
  batchtools status: 'defined', 'finished', 'started', 'submitted'
  batchtools Registry:
    File dir exists: FALSE
    Work dir exists: TRUE
  Job Registry
    Backend  : Interactive
    File dir : D:/temp/RtmpsvRBqM/.future/20240323_143716-svRBqM/strategy_batchtools_local_1515478804
    Work dir : D:/Rcompile/CRANpkg/local/4.4/future.batchtools.Rcheck/tests
    Jobs     : 1
    Seed     : 5001
    Writeable: TRUE
  - plan('batchtools_local') ... DONE
  > 
  > message("*** Futures - labels ... DONE")
  *** Futures - labels ... DONE
  > 
  > source("incl/end.R")
  > 
  > proc.time()
     user  system elapsed 
     1.57    0.45    8.25 
Running the tests in 'tests/resources_OP.R' failed.
Complete output:
  > source("incl/start.R")
  Loading required package: parallelly
  Loading required package: future
  > 
  > message("*** %resources% ...")
  *** %resources% ...
  > 
  > plan(batchtools_local)
  > 
  > ## This will test `%resources%` but it'll be ignored (with a warning)
  > ## by batchtools_local()
  > y %<-% { 42 } %resources% list(memory = 16000) ## 16,000 MiB of memory
  Warning: Detected 1 unknown future arguments: 'resources'
  > 
  > message("*** %resources% ... DONE")
  *** %resources% ... DONE
  > 
  > source("incl/end.R")
  > 
  > proc.time()
     user  system elapsed 
     0.87    0.29    2.25 
Running the tests in 'tests/rng.R' failed.
Complete output:
  > source("incl/start.R")
  Loading required package: parallelly
  Loading required package: future
  > 
  > options(future.debug = FALSE)
  > 
  > message("*** RNG ...")
  *** RNG ...
  > 
  > plan(batchtools_local)
  > 
  > message("- run() does not update RNG state")
  - run() does not update RNG state
  > 
  > f1 <- future(1, lazy = TRUE)
  > f2 <- future(2, lazy = TRUE)
  > 
  > rng0 <- globalenv()$.Random.seed
  > 
  > f1 <- run(f1)
  > stopifnot(identical(globalenv()$.Random.seed, rng0))  ## RNG changed?
  > 
  > f2 <- run(f2)
  > stopifnot(identical(globalenv()$.Random.seed, rng0))  ## RNG changed?
  > 
  > v1 <- value(f1)
  > stopifnot(identical(v1, 1))
  > 
  > v2 <- value(f2)
  > stopifnot(identical(v2, 2))
  > 
  > 
  > message("- future() does not update RNG state")
  - future() does not update RNG state
  > 
  > rng0 <- globalenv()$.Random.seed
  > 
  > f1 <- future(1)
  > stopifnot(identical(globalenv()$.Random.seed, rng0))  ## RNG changed?
  > 
  > f2 <- future(2)
  > stopifnot(identical(globalenv()$.Random.seed, rng0))  ## RNG changed?
  > 
  > v1 <- value(f1)
  > stopifnot(identical(v1, 1))
  > 
  > v2 <- value(f2)
  > stopifnot(identical(v2, 2))
  > 
  > 
  > message("- resolved() does not update RNG state")
  - resolved() does not update RNG state
  > 
  > f1 <- future(1)
  > f2 <- future(2)
  > 
  > rng0 <- globalenv()$.Random.seed
  > 
  > d1 <- resolved(f1)
  > stopifnot(identical(globalenv()$.Random.seed, rng0))  ## RNG changed?
  > 
  > d2 <- resolved(f2)
  > stopifnot(identical(globalenv()$.Random.seed, rng0))  ## RNG changed?
  > 
  > v1 <- value(f1)
  > stopifnot(identical(v1, 1))
  > 
  > v2 <- value(f2)
  > stopifnot(identical(v2, 2))
  > 
  > 
  > message("- result() does not update RNG state")
  - result() does not update RNG state
  > 
  > f1 <- future(1)
  > f2 <- future(2)
  > 
  > rng0 <- globalenv()$.Random.seed
  > 
  > r1 <- result(f1)
  > stopifnot(identical(r1$value, 1))
  > stopifnot(identical(globalenv()$.Random.seed, rng0))  ## RNG changed?
  > 
  > r2 <- result(f2)
  > stopifnot(identical(r2$value, 2))
  > stopifnot(identical(globalenv()$.Random.seed, rng0))  ## RNG changed?
  > 
  > v1 <- value(f1)
  > stopifnot(identical(v1, 1))
  > 
  > v2 <- value(f2)
  > stopifnot(identical(v2, 2))
  > 
  > 
  > message("- value() does not update RNG state")
  - value() does not update RNG state
  > 
  > f1 <- future(1)
  > f2 <- future(2)
  > 
  > rng0 <- globalenv()$.Random.seed
  > 
  > v1 <- value(f1)
  > stopifnot(identical(v1, 1))
  > stopifnot(identical(globalenv()$.Random.seed, rng0))  ## RNG changed?
  > 
  > v2 <- value(f2)
  > stopifnot(identical(v2, 2))
  > stopifnot(identical(globalenv()$.Random.seed, rng0))  ## RNG changed?
  > 
  > message("*** RNG ... DONE")
  *** RNG ... DONE
  > 
  > source("incl/end.R")
  > 
  > proc.time()
     user  system elapsed 
     2.00    0.34   12.04 
Running the tests in 'tests/zzz,future_lapply.R' failed.
Complete output:
  > source("incl/start.R")
  Loading required package: parallelly
  Loading required package: future
  > 
  > if (requireNamespace("future.apply", quietly = TRUE)) {
  +   future_lapply <- future.apply::future_lapply
  +   library("listenv")
  + 
  +   ## Setup all strategies including custom once for testing on HPC environments
  +   print(all_strategies())
  + 
  +   message("All HPC strategies:")
  +   strategies <- c("batchtools_lsf", "batchtools_openlava", "batchtools_sge",
  +                   "batchtools_slurm", "batchtools_torque")
  +   mprint(strategies, debug = TRUE)
  +   
  +   message("Supported HPC strategies:")
  +   strategies <- strategies[sapply(strategies, FUN = test_strategy)]
  +   mprint(strategies, debug = TRUE)
  + 
  +   strategies <- c("batchtools_local", strategies)
  +   
  +   if (fullTest) {
  +     strategies <- c("batchtools_interactive", strategies)
  +     
  +     batchtools_custom_local <- function(expr, substitute = TRUE,
  +         cluster.functions = batchtools::makeClusterFunctionsInteractive(external = TRUE), ...) {
  +       if (substitute) expr <- substitute(expr)
  +       batchtools_custom(expr, substitute = FALSE, ...,
  +                         cluster.functions = cluster.functions)
  +     }
  +     class(batchtools_custom_local) <- c("batchtools_custom_local",
  +                                         class(batchtools_custom))
  +     strategies <- c("batchtools_custom_local", strategies)
  +   }
  + 
  +   ## CRAN processing times: Don't run these tests on Windows 32-bit
  +   if (!fullTest && isWin32) strategies <- character(0L)
  +   
  +   message("Strategies to test with:")
  +   mprint(strategies, debug = TRUE)
  +   
  +   
  +   message("*** future_lapply() ...")
  +   
  +   message("- future_lapply(x, FUN = vector, ...) ...")
  +   
  +   x <- list(a = "integer", c = "character", c = "list")
  +   str(list(x = x))
  + 
  +   y0 <- lapply(x, FUN = vector, length = 2L)
  +   str(list(y0 = y0))
  + 
  +   for (strategy in strategies) {
  +     mprintf("- plan('%s') ...\n", strategy)
  +     plan(strategy)
  +     mprint(plan, debug = TRUE)
  +     if (nbrOfWorkers() > 2) plan(strategy, workers = 2L)
  +     stopifnot(nbrOfWorkers() < Inf)
  +   
  +     for (scheduling in list(FALSE, TRUE)) {
  +       y <- future_lapply(x, FUN = vector, length = 2L,
  +                          future.scheduling = scheduling)
  +       str(list(y = y))
  +       stopifnot(identical(y, y0))
  +     }
  +   }
  +   
  +   
  +   message("- future_lapply(x, FUN = base::vector, ...) ...")
  +   
  +   x <- list(a = "integer", c = "character", c = "list")
  +   str(list(x = x))
  +   
  +   y0 <- lapply(x, FUN = base::vector, length = 2L)
  +   str(list(y0 = y0))
  +   
  +   for (strategy in strategies) {
  +     mprintf("- plan('%s') ...\n", strategy)
  +     plan(strategy)
  +     mprint(plan, debug = TRUE)
  +     if (nbrOfWorkers() > 2) plan(strategy, workers = 2L)
  +     stopifnot(nbrOfWorkers() < Inf)
  +   
  +     for (scheduling in list(FALSE, TRUE)) {
  +       y <- future_lapply(x, FUN = base::vector, length = 2L,
  +                          future.scheduling = scheduling)
  +       str(list(y = y))
  +       stopifnot(identical(y, y0))
  +     }
  +   }
  +   
  +   message("- future_lapply(x, FUN = future:::hpaste, ...) ...")
  +   
  +   x <- list(a = c("hello", b = 1:100))
  +   str(list(x = x))
  +   
  +   y0 <- lapply(x, FUN = future:::hpaste, collapse = "; ", maxHead = 3L)
  +   str(list(y0 = y0))
  +   
  +   for (strategy in strategies) {
  +     mprintf("- plan('%s') ...\n", strategy)
  +     plan(strategy)
  +     mprint(plan, debug = TRUE)
  +     if (nbrOfWorkers() > 2) plan(strategy, workers = 2L)
  +     stopifnot(nbrOfWorkers() < Inf)
  +   
  +     for (scheduling in list(FALSE, TRUE)) {
  +       y <- future_lapply(x, FUN = future:::hpaste, collapse = "; ",
  +                          maxHead = 3L, future.scheduling = scheduling)
  +       str(list(y = y))
  +       stopifnot(identical(y, y0))
  +     }
  +   }
  +   
  +   
  +   message("- future_lapply(x, FUN = listenv::listenv, ...) ...")
  +   
  +   x <- list()
  +   
  +   y <- listenv()
  +   y$A <- 3L
  +   x$a <- y
  +   
  +   y <- listenv()
  +   y$A <- 3L
  +   y$B <- c("hello", b = 1:100)
  +   x$b <- y
  +   
  +   print(x)
  +   
  +   y0 <- lapply(x, FUN = listenv::mapping)
  +   str(list(y0 = y0))
  +   
  +   for (strategy in strategies) {
  +     mprintf("- plan('%s') ...\n", strategy)
  +     plan(strategy)
  +     if (nbrOfWorkers() > 2) plan(strategy, workers = 2L)
  +     stopifnot(nbrOfWorkers() < Inf)
  +     
  +     for (scheduling in list(FALSE, TRUE)) {
  +       y <- future_lapply(x, FUN = listenv::mapping, future.scheduling = scheduling)
  +       str(list(y = y))
  +       stopifnot(identical(y, y0))
  +     }
  +   }
  +   
  +   
  +   message("- future_lapply(x, FUN, ...) for large length(x) ...")
  +   a <- 3.14
  +   x <- 1:1e5
  +   
  +   y <- future_lapply(x, FUN = function(z) sqrt(z + a))
  +   y <- unlist(y, use.names = FALSE)
  +   
  +   stopifnot(all.equal(y, sqrt(x + a)))
  +   
  +   
  +   message("- future_lapply() with global in non-attached package ...")
  +   library("tools")
  +   my_ext <- function(x) file_ext(x)
  +   y_truth <- lapply("abc.txt", FUN = my_ext)
  +   
  +   for (strategy in strategies) {
  +     plan(strategy)
  +     if (nbrOfWorkers() > 2) plan(strategy, workers = 2L)
  +     stopifnot(nbrOfWorkers() < Inf)
  +     y <- future_lapply("abc.txt", FUN = my_ext)
  +     stopifnot(identical(y, y_truth))
  +   }
  +   
  +   message("*** future_lapply() ... DONE")
  + }
  [1] "sequential"   "multisession" "cluster"     
  All HPC strategies:
  [14:46:15.290] [1] "batchtools_lsf"      "batchtools_openlava" "batchtools_sge"     
  [14:46:15.290] [4] "batchtools_slurm"    "batchtools_torque"  
  Supported HPC strategies:
  [14:46:15.295] character(0)
  Strategies to test with:
  [14:46:15.296] [1] "batchtools_local"
  *** future_lapply() ...
  - future_lapply(x, FUN = vector, ...) ...
  List of 1
   $ x:List of 3
    ..$ a: chr "integer"
    ..$ c: chr "character"
    ..$ c: chr "list"
  List of 1
   $ y0:List of 3
    ..$ a: int [1:2] 0 0
    ..$ c: chr [1:2] "" ""
    ..$ c:List of 2
    .. ..$ : NULL
    .. ..$ : NULL
  - plan('batchtools_local') ...
  [14:46:15.334] function (strategy = NULL, ..., substitute = TRUE, .skip = FALSE, 
  [14:46:15.334]     .call = TRUE, .cleanup = TRUE, .init = TRUE) 
  [14:46:15.334] {
  [14:46:15.334]     if (substitute) 
  [14:46:15.334]         strategy <- substitute(strategy)
  [14:46:15.334]     if (is.logical(.skip)) 
  [14:46:15.334]         stop_if_not(length(.skip) == 1L, !is.na(.skip))
  [14:46:15.334]     if (is.logical(.call)) 
  [14:46:15.334]         stop_if_not(length(.call) == 1L, !is.na(.call))
  [14:46:15.334]     if (is.null(strategy) || identical(strategy, "next")) {
  [14:46:15.334]         strategy <- stack[[1L]]
  [14:46:15.334]         if (!inherits(strategy, "FutureStrategy")) {
  [14:46:15.334]             class(strategy) <- c("FutureStrategy", class(strategy))
  [14:46:15.334]         }
  [14:46:15.334]         stop_if_not(is.function(strategy))
  [14:46:15.334]         return(strategy)
  [14:46:15.334]     }
  [14:46:15.334]     else if (identical(strategy, "default")) {
  [14:46:15.334]         strategy <- getOption("future.plan", sequential)
  [14:46:15.334]     }
  [14:46:15.334]     else if (identical(strategy, "list")) {
  [14:46:15.334]         return(stack)
  [14:46:15.334]     }
  [14:46:15.334]     else if (identical(strategy, "reset")) {
  [14:46:15.334]         stack <<- defaultStack
  [14:46:15.334]         if (.cleanup) 
  [14:46:15.334]             plan_cleanup()
  [14:46:15.334]         return(stack)
  [14:46:15.334]     }
  [14:46:15.334]     else if (identical(strategy, "pop")) {
  [14:46:15.334]         oldStack <- stack
  [14:46:15.334]         stack <<- stack[-1L]
  [14:46:15.334]         if (length(stack) == 0L) 
  [14:46:15.334]             stack <<- defaultStack
  [14:46:15.334]         return(oldStack)
  [14:46:15.334]     }
  [14:46:15.334]     oldStack <- stack
  [14:46:15.334]     newStack <- NULL
  [14:46:15.334]     targs <- list(...)
  [14:46:15.334]     if (is.function(strategy)) {
  [14:46:15.334]         if (length(targs) > 0) {
  [14:46:15.334]             args <- c(list(strategy), targs, penvir = parent.frame())
  [14:46:15.334]             strategy <- do.call(tweak, args = args)
  [14:46:15.334]         }
  [14:46:15.334]         strategy <- list(strategy)
  [14:46:15.334]     }
  [14:46:15.334]     if (is.list(strategy)) {
  [14:46:15.334]         oldStack <- plan_set(strategy, skip = .skip, cleanup = .cleanup, 
  [14:46:15.334]             init = .init)
  [14:46:15.334]         return(invisible(oldStack))
  [14:46:15.334]     }
  [14:46:15.334]     if (is.language(strategy)) {
  [14:46:15.334]         first <- as.list(strategy)[[1]]
  [14:46:15.334]         if (is.symbol(first)) {
  [14:46:15.334]             if (is.call(strategy)) {
  [14:46:15.334]                 first <- get(as.character(first), mode = "function", 
  [14:46:15.334]                   envir = parent.frame(), inherits = TRUE)
  [14:46:15.334]             }
  [14:46:15.334]             else {
  [14:46:15.334]                 first <- eval(first, envir = parent.frame(), 
  [14:46:15.334]                   enclos = baseenv())
  [14:46:15.334]             }
  [14:46:15.334]             if (is.list(first)) {
  [14:46:15.334]                 strategies <- first
  [14:46:15.334]                 res <- plan(strategies, substitute = FALSE, .cleanup = .cleanup, 
  [14:46:15.334]                   .init = .init)
  [14:46:15.334]                 return(invisible(res))
  [14:46:15.334]             }
  [14:46:15.334]             if (is.function(first) && !inherits(first, "future")) {
  [14:46:15.334]                 strategies <- eval(strategy, envir = parent.frame(), 
  [14:46:15.334]                   enclos = baseenv())
  [14:46:15.334]                 if (is.list(strategies)) {
  [14:46:15.334]                   for (kk in seq_along(strategies)) {
  [14:46:15.334]                     strategy_kk <- strategies[[kk]]
  [14:46:15.334]                     if (is.character(strategy_kk)) {
  [14:46:15.334]                       strategy_kk <- tweak(strategy_kk, penvir = parent.frame())
  [14:46:15.334]                       strategies[[kk]] <- strategy_kk
  [14:46:15.334]                     }
  [14:46:15.334]                   }
  [14:46:15.334]                   newStack <- strategies
  [14:46:15.334]                   stop_if_not(!is.null(newStack), is.list(newStack), 
  [14:46:15.334]                     length(newStack) >= 1L)
  [14:46:15.334]                 }
  [14:46:15.334]                 else if (is.function(strategies) && !inherits(strategies, 
  [14:46:15.334]                   "future")) {
  [14:46:15.334]                   strategies <- list(strategies)
  [14:46:15.334]                   newStack <- strategies
  [14:46:15.334]                   stop_if_not(!is.null(newStack), is.list(newStack), 
  [14:46:15.334]                     length(newStack) >= 1L)
  [14:46:15.334]                 }
  [14:46:15.334]             }
  [14:46:15.334]         }
  [14:46:15.334]     }
  [14:46:15.334]     if (is.null(newStack)) {
  [14:46:15.334]         if (is.symbol(strategy)) {
  [14:46:15.334]             strategy <- eval(strategy, envir = parent.frame(), 
  [14:46:15.334]                 enclos = baseenv())
  [14:46:15.334]         }
  [14:46:15.334]         else if (is.language(strategy)) {
  [14:46:15.334]             strategyT <- as.list(strategy)
  [14:46:15.334]             if (strategyT[[1]] == as.symbol("tweak")) {
  [14:46:15.334]                 strategy <- eval(strategy, envir = parent.frame(), 
  [14:46:15.334]                   enclos = baseenv())
  [14:46:15.334]             }
  [14:46:15.334]             else {
  [14:46:15.334]                 isSymbol <- sapply(strategyT, FUN = is.symbol)
  [14:46:15.334]                 if (!all(isSymbol)) {
  [14:46:15.334]                   strategy <- eval(strategyT[[1L]], envir = parent.frame(), 
  [14:46:15.334]                     enclos = baseenv())
  [14:46:15.334]                   if (length(strategyT) > 1L) {
  [14:46:15.334]                     args <- c(list(strategy), strategyT[-1L], 
  [14:46:15.334]                       penvir = parent.frame())
  [14:46:15.334]                     strategy <- do.call(tweak, args = args)
  [14:46:15.334]                   }
  [14:46:15.334]                 }
  [14:46:15.334]                 else {
  [14:46:15.334]                   strategy <- eval(strategy, envir = parent.frame(), 
  [14:46:15.334]                     enclos = baseenv())
  [14:46:15.334]                 }
  [14:46:15.334]             }
  [14:46:15.334]         }
  [14:46:15.334]         args <- c(list(strategy), targs, penvir = parent.frame())
  [14:46:15.334]         tstrategy <- do.call(tweak, args = args, quote = TRUE)
  [14:46:15.334]         newStack <- list(tstrategy)
  [14:46:15.334]         stop_if_not(!is.null(newStack), is.list(newStack), length(newStack) >= 
  [14:46:15.334]             1L)
  [14:46:15.334]     }
  [14:46:15.334]     if (!is.null(.call)) {
  [14:46:15.334]         call <- if (isTRUE(.call)) 
  [14:46:15.334]             sys.call()
  [14:46:15.334]         else .call
  [14:46:15.334]         for (kk in seq_along(newStack)) {
  [14:46:15.334]             strategy <- newStack[[kk]]
  [14:46:15.334]             if (!is.null(attr(strategy, "call", exact = TRUE))) 
  [14:46:15.334]                 next
  [14:46:15.334]             attr(strategy, "call") <- call
  [14:46:15.334]             newStack[[kk]] <- strategy
  [14:46:15.334]         }
  [14:46:15.334]         stop_if_not(!is.null(newStack), is.list(newStack), length(newStack) >= 
  [14:46:15.334]             1L)
  [14:46:15.334]     }
  [14:46:15.334]     oldStack <- plan_set(newStack, skip = .skip, cleanup = .cleanup, 
  [14:46:15.334]         init = .init)
  [14:46:15.334]     invisible(oldStack)
  [14:46:15.334] }
  [14:46:15.334] <bytecode: 0x000002503ff5c530>
  [14:46:15.334] <environment: 0x000002503ff47c00>
  List of 1
   $ y:List of 3
    ..$ a: int [1:2] 0 0
    ..$ c: chr [1:2] "" ""
    ..$ c:List of 2
    .. ..$ : NULL
    .. ..$ : NULL
  List of 1
   $ y:List of 3
    ..$ a: int [1:2] 0 0
    ..$ c: chr [1:2] "" ""
    ..$ c:List of 2
    .. ..$ : NULL
    .. ..$ : NULL
  - future_lapply(x, FUN = base::vector, ...) ...
  List of 1
   $ x:List of 3
    ..$ a: chr "integer"
    ..$ c: chr "character"
    ..$ c: chr "list"
  List of 1
   $ y0:List of 3
    ..$ a: int [1:2] 0 0
    ..$ c: chr [1:2] "" ""
    ..$ c:List of 2
    .. ..$ : NULL
    .. ..$ : NULL
  - plan('batchtools_local') ...
  [14:46:20.188] function (strategy = NULL, ..., substitute = TRUE, .skip = FALSE, 
  [14:46:20.188]     .call = TRUE, .cleanup = TRUE, .init = TRUE) 
  [14:46:20.188] {
  [14:46:20.188]     if (substitute) 
  [14:46:20.188]         strategy <- substitute(strategy)
  [14:46:20.188]     if (is.logical(.skip)) 
  [14:46:20.188]         stop_if_not(length(.skip) == 1L, !is.na(.skip))
  [14:46:20.188]     if (is.logical(.call)) 
  [14:46:20.188]         stop_if_not(length(.call) == 1L, !is.na(.call))
  [14:46:20.188]     if (is.null(strategy) || identical(strategy, "next")) {
  [14:46:20.188]         strategy <- stack[[1L]]
  [14:46:20.188]         if (!inherits(strategy, "FutureStrategy")) {
  [14:46:20.188]             class(strategy) <- c("FutureStrategy", class(strategy))
  [14:46:20.188]         }
  [14:46:20.188]         stop_if_not(is.function(strategy))
  [14:46:20.188]         return(strategy)
  [14:46:20.188]     }
  [14:46:20.188]     else if (identical(strategy, "default")) {
  [14:46:20.188]         strategy <- getOption("future.plan", sequential)
  [14:46:20.188]     }
  [14:46:20.188]     else if (identical(strategy, "list")) {
  [14:46:20.188]         return(stack)
  [14:46:20.188]     }
  [14:46:20.188]     else if (identical(strategy, "reset")) {
  [14:46:20.188]         stack <<- defaultStack
  [14:46:20.188]         if (.cleanup) 
  [14:46:20.188]             plan_cleanup()
  [14:46:20.188]         return(stack)
  [14:46:20.188]     }
  [14:46:20.188]     else if (identical(strategy, "pop")) {
  [14:46:20.188]         oldStack <- stack
  [14:46:20.188]         stack <<- stack[-1L]
  [14:46:20.188]         if (length(stack) == 0L) 
  [14:46:20.188]             stack <<- defaultStack
  [14:46:20.188]         return(oldStack)
  [14:46:20.188]     }
  [14:46:20.188]     oldStack <- stack
  [14:46:20.188]     newStack <- NULL
  [14:46:20.188]     targs <- list(...)
  [14:46:20.188]     if (is.function(strategy)) {
  [14:46:20.188]         if (length(targs) > 0) {
  [14:46:20.188]             args <- c(list(strategy), targs, penvir = parent.frame())
  [14:46:20.188]             strategy <- do.call(tweak, args = args)
  [14:46:20.188]         }
  [14:46:20.188]         strategy <- list(strategy)
  [14:46:20.188]     }
  [14:46:20.188]     if (is.list(strategy)) {
  [14:46:20.188]         oldStack <- plan_set(strategy, skip = .skip, cleanup = .cleanup, 
  [14:46:20.188]             init = .init)
  [14:46:20.188]         return(invisible(oldStack))
  [14:46:20.188]     }
  [14:46:20.188]     if (is.language(strategy)) {
  [14:46:20.188]         first <- as.list(strategy)[[1]]
  [14:46:20.188]         if (is.symbol(first)) {
  [14:46:20.188]             if (is.call(strategy)) {
  [14:46:20.188]                 first <- get(as.character(first), mode = "function", 
  [14:46:20.188]                   envir = parent.frame(), inherits = TRUE)
  [14:46:20.188]             }
  [14:46:20.188]             else {
  [14:46:20.188]                 first <- eval(first, envir = parent.frame(), 
  [14:46:20.188]                   enclos = baseenv())
  [14:46:20.188]             }
  [14:46:20.188]             if (is.list(first)) {
  [14:46:20.188]                 strategies <- first
  [14:46:20.188]                 res <- plan(strategies, substitute = FALSE, .cleanup = .cleanup, 
  [14:46:20.188]                   .init = .init)
  [14:46:20.188]                 return(invisible(res))
  [14:46:20.188]             }
  [14:46:20.188]             if (is.function(first) && !inherits(first, "future")) {
  [14:46:20.188]                 strategies <- eval(strategy, envir = parent.frame(), 
  [14:46:20.188]                   enclos = baseenv())
  [14:46:20.188]                 if (is.list(strategies)) {
  [14:46:20.188]                   for (kk in seq_along(strategies)) {
  [14:46:20.188]                     strategy_kk <- strategies[[kk]]
  [14:46:20.188]                     if (is.character(strategy_kk)) {
  [14:46:20.188]                       strategy_kk <- tweak(strategy_kk, penvir = parent.frame())
  [14:46:20.188]                       strategies[[kk]] <- strategy_kk
  [14:46:20.188]                     }
  [14:46:20.188]                   }
  [14:46:20.188]                   newStack <- strategies
  [14:46:20.188]                   stop_if_not(!is.null(newStack), is.list(newStack), 
  [14:46:20.188]                     length(newStack) >= 1L)
  [14:46:20.188]                 }
  [14:46:20.188]                 else if (is.function(strategies) && !inherits(strategies, 
  [14:46:20.188]                   "future")) {
  [14:46:20.188]                   strategies <- list(strategies)
  [14:46:20.188]                   newStack <- strategies
  [14:46:20.188]                   stop_if_not(!is.null(newStack), is.list(newStack), 
  [14:46:20.188]                     length(newStack) >= 1L)
  [14:46:20.188]                 }
  [14:46:20.188]             }
  [14:46:20.188]         }
  [14:46:20.188]     }
  [14:46:20.188]     if (is.null(newStack)) {
  [14:46:20.188]         if (is.symbol(strategy)) {
  [14:46:20.188]             strategy <- eval(strategy, envir = parent.frame(), 
  [14:46:20.188]                 enclos = baseenv())
  [14:46:20.188]         }
  [14:46:20.188]         else if (is.language(strategy)) {
  [14:46:20.188]             strategyT <- as.list(strategy)
  [14:46:20.188]             if (strategyT[[1]] == as.symbol("tweak")) {
  [14:46:20.188]                 strategy <- eval(strategy, envir = parent.frame(), 
  [14:46:20.188]                   enclos = baseenv())
  [14:46:20.188]             }
  [14:46:20.188]             else {
  [14:46:20.188]                 isSymbol <- sapply(strategyT, FUN = is.symbol)
  [14:46:20.188]                 if (!all(isSymbol)) {
  [14:46:20.188]                   strategy <- eval(strategyT[[1L]], envir = parent.frame(), 
  [14:46:20.188]                     enclos = baseenv())
  [14:46:20.188]                   if (length(strategyT) > 1L) {
  [14:46:20.188]                     args <- c(list(strategy), strategyT[-1L], 
  [14:46:20.188]                       penvir = parent.frame())
  [14:46:20.188]                     strategy <- do.call(tweak, args = args)
  [14:46:20.188]                   }
  [14:46:20.188]                 }
  [14:46:20.188]                 else {
  [14:46:20.188]                   strategy <- eval(strategy, envir = parent.frame(), 
  [14:46:20.188]                     enclos = baseenv())
  [14:46:20.188]                 }
  [14:46:20.188]             }
  [14:46:20.188]         }
  [14:46:20.188]         args <- c(list(strategy), targs, penvir = parent.frame())
  [14:46:20.188]         tstrategy <- do.call(tweak, args = args, quote = TRUE)
  [14:46:20.188]         newStack <- list(tstrategy)
  [14:46:20.188]         stop_if_not(!is.null(newStack), is.list(newStack), length(newStack) >= 
  [14:46:20.188]             1L)
  [14:46:20.188]     }
  [14:46:20.188]     if (!is.null(.call)) {
  [14:46:20.188]         call <- if (isTRUE(.call)) 
  [14:46:20.188]             sys.call()
  [14:46:20.188]         else .call
  [14:46:20.188]         for (kk in seq_along(newStack)) {
  [14:46:20.188]             strategy <- newStack[[kk]]
  [14:46:20.188]             if (!is.null(attr(strategy, "call", exact = TRUE))) 
  [14:46:20.188]                 next
  [14:46:20.188]             attr(strategy, "call") <- call
  [14:46:20.188]             newStack[[kk]] <- strategy
  [14:46:20.188]         }
  [14:46:20.188]         stop_if_not(!is.null(newStack), is.list(newStack), length(newStack) >= 
  [14:46:20.188]             1L)
  [14:46:20.188]     }
  [14:46:20.188]     oldStack <- plan_set(newStack, skip = .skip, cleanup = .cleanup, 
  [14:46:20.188]         init = .init)
  [14:46:20.188]     invisible(oldStack)
  [14:46:20.188] }
  [14:46:20.188] <bytecode: 0x000002503ff5c530>
  [14:46:20.188] <environment: 0x000002503ff47c00>
  List of 1
   $ y:List of 3
    ..$ a: int [1:2] 0 0
    ..$ c: chr [1:2] "" ""
    ..$ c:List of 2
    .. ..$ : NULL
    .. ..$ : NULL
  List of 1
   $ y:List of 3
    ..$ a: int [1:2] 0 0
    ..$ c: chr [1:2] "" ""
    ..$ c:List of 2
    .. ..$ : NULL
    .. ..$ : NULL
  - future_lapply(x, FUN = future:::hpaste, ...) ...
  List of 1
   $ x:List of 1
    ..$ a: Named chr [1:101] "hello" "1" "2" "3" ...
    .. ..- attr(*, "names")= chr [1:101] "" "b1" "b2" "b3" ...
  List of 1
   $ y0:List of 1
    ..$ a: chr "hello; 1; 2; ...; 100"
  - plan('batchtools_local') ...
  [14:46:24.854] function (strategy = NULL, ..., substitute = TRUE, .skip = FALSE, 
  [14:46:24.854]     .call = TRUE, .cleanup = TRUE, .init = TRUE) 
  [14:46:24.854] {
  [14:46:24.854]     if (substitute) 
  [14:46:24.854]         strategy <- substitute(strategy)
  [14:46:24.854]     if (is.logical(.skip)) 
  [14:46:24.854]         stop_if_not(length(.skip) == 1L, !is.na(.skip))
  [14:46:24.854]     if (is.logical(.call)) 
  [14:46:24.854]         stop_if_not(length(.call) == 1L, !is.na(.call))
  [14:46:24.854]     if (is.null(strategy) || identical(strategy, "next")) {
  [14:46:24.854]         strategy <- stack[[1L]]
  [14:46:24.854]         if (!inherits(strategy, "FutureStrategy")) {
  [14:46:24.854]             class(strategy) <- c("FutureStrategy", class(strategy))
  [14:46:24.854]         }
  [14:46:24.854]         stop_if_not(is.function(strategy))
  [14:46:24.854]         return(strategy)
  [14:46:24.854]     }
  [14:46:24.854]     else if (identical(strategy, "default")) {
  [14:46:24.854]         strategy <- getOption("future.plan", sequential)
  [14:46:24.854]     }
  [14:46:24.854]     else if (identical(strategy, "list")) {
  [14:46:24.854]         return(stack)
  [14:46:24.854]     }
  [14:46:24.854]     else if (identical(strategy, "reset")) {
  [14:46:24.854]         stack <<- defaultStack
  [14:46:24.854]         if (.cleanup) 
  [14:46:24.854]             plan_cleanup()
  [14:46:24.854]         return(stack)
  [14:46:24.854]     }
  [14:46:24.854]     else if (identical(strategy, "pop")) {
  [14:46:24.854]         oldStack <- stack
  [14:46:24.854]         stack <<- stack[-1L]
  [14:46:24.854]         if (length(stack) == 0L) 
  [14:46:24.854]             stack <<- defaultStack
  [14:46:24.854]         return(oldStack)
  [14:46:24.854]     }
  [14:46:24.854]     oldStack <- stack
  [14:46:24.854]     newStack <- NULL
  [14:46:24.854]     targs <- list(...)
  [14:46:24.854]     if (is.function(strategy)) {
  [14:46:24.854]         if (length(targs) > 0) {
  [14:46:24.854]             args <- c(list(strategy), targs, penvir = parent.frame())
  [14:46:24.854]             strategy <- do.call(tweak, args = args)
  [14:46:24.854]         }
  [14:46:24.854]         strategy <- list(strategy)
  [14:46:24.854]     }
  [14:46:24.854]     if (is.list(strategy)) {
  [14:46:24.854]         oldStack <- plan_set(strategy, skip = .skip, cleanup = .cleanup, 
  [14:46:24.854]             init = .init)
  [14:46:24.854]         return(invisible(oldStack))
  [14:46:24.854]     }
  [14:46:24.854]     if (is.language(strategy)) {
  [14:46:24.854]         first <- as.list(strategy)[[1]]
  [14:46:24.854]         if (is.symbol(first)) {
  [14:46:24.854]             if (is.call(strategy)) {
  [14:46:24.854]                 first <- get(as.character(first), mode = "function", 
  [14:46:24.854]                   envir = parent.frame(), inherits = TRUE)
  [14:46:24.854]             }
  [14:46:24.854]             else {
  [14:46:24.854]                 first <- eval(first, envir = parent.frame(), 
  [14:46:24.854]                   enclos = baseenv())
  [14:46:24.854]             }
  [14:46:24.854]             if (is.list(first)) {
  [14:46:24.854]                 strategies <- first
  [14:46:24.854]                 res <- plan(strategies, substitute = FALSE, .cleanup = .cleanup, 
  [14:46:24.854]                   .init = .init)
  [14:46:24.854]                 return(invisible(res))
  [14:46:24.854]             }
  [14:46:24.854]             if (is.function(first) && !inherits(first, "future")) {
  [14:46:24.854]                 strategies <- eval(strategy, envir = parent.frame(), 
  [14:46:24.854]                   enclos = baseenv())
  [14:46:24.854]                 if (is.list(strategies)) {
  [14:46:24.854]                   for (kk in seq_along(strategies)) {
  [14:46:24.854]                     strategy_kk <- strategies[[kk]]
  [14:46:24.854]                     if (is.character(strategy_kk)) {
  [14:46:24.854]                       strategy_kk <- tweak(strategy_kk, penvir = parent.frame())
  [14:46:24.854]                       strategies[[kk]] <- strategy_kk
  [14:46:24.854]                     }
  [14:46:24.854]                   }
  [14:46:24.854]                   newStack <- strategies
  [14:46:24.854]                   stop_if_not(!is.null(newStack), is.list(newStack), 
  [14:46:24.854]                     length(newStack) >= 1L)
  [14:46:24.854]                 }
  [14:46:24.854]                 else if (is.function(strategies) && !inherits(strategies, 
  [14:46:24.854]                   "future")) {
  [14:46:24.854]                   strategies <- list(strategies)
  [14:46:24.854]                   newStack <- strategies
  [14:46:24.854]                   stop_if_not(!is.null(newStack), is.list(newStack), 
  [14:46:24.854]                     length(newStack) >= 1L)
  [14:46:24.854]                 }
  [14:46:24.854]             }
  [14:46:24.854]         }
  [14:46:24.854]     }
  [14:46:24.854]     if (is.null(newStack)) {
  [14:46:24.854]         if (is.symbol(strategy)) {
  [14:46:24.854]             strategy <- eval(strategy, envir = parent.frame(), 
  [14:46:24.854]                 enclos = baseenv())
  [14:46:24.854]         }
  [14:46:24.854]         else if (is.language(strategy)) {
  [14:46:24.854]             strategyT <- as.list(strategy)
  [14:46:24.854]             if (strategyT[[1]] == as.symbol("tweak")) {
  [14:46:24.854]                 strategy <- eval(strategy, envir = parent.frame(), 
  [14:46:24.854]                   enclos = baseenv())
  [14:46:24.854]             }
  [14:46:24.854]             else {
  [14:46:24.854]                 isSymbol <- sapply(strategyT, FUN = is.symbol)
  [14:46:24.854]                 if (!all(isSymbol)) {
  [14:46:24.854]                   strategy <- eval(strategyT[[1L]], envir = parent.frame(), 
  [14:46:24.854]                     enclos = baseenv())
  [14:46:24.854]                   if (length(strategyT) > 1L) {
  [14:46:24.854]                     args <- c(list(strategy), strategyT[-1L], 
  [14:46:24.854]                       penvir = parent.frame())
  [14:46:24.854]                     strategy <- do.call(tweak, args = args)
  [14:46:24.854]                   }
  [14:46:24.854]                 }
  [14:46:24.854]                 else {
  [14:46:24.854]                   strategy <- eval(strategy, envir = parent.frame(), 
  [14:46:24.854]                     enclos = baseenv())
  [14:46:24.854]                 }
  [14:46:24.854]             }
  [14:46:24.854]         }
  [14:46:24.854]         args <- c(list(strategy), targs, penvir = parent.frame())
  [14:46:24.854]         tstrategy <- do.call(tweak, args = args, quote = TRUE)
  [14:46:24.854]         newStack <- list(tstrategy)
  [14:46:24.854]         stop_if_not(!is.null(newStack), is.list(newStack), length(newStack) >= 
  [14:46:24.854]             1L)
  [14:46:24.854]     }
  [14:46:24.854]     if (!is.null(.call)) {
  [14:46:24.854]         call <- if (isTRUE(.call)) 
  [14:46:24.854]             sys.call()
  [14:46:24.854]         else .call
  [14:46:24.854]         for (kk in seq_along(newStack)) {
  [14:46:24.854]             strategy <- newStack[[kk]]
  [14:46:24.854]             if (!is.null(attr(strategy, "call", exact = TRUE))) 
  [14:46:24.854]                 next
  [14:46:24.854]             attr(strategy, "call") <- call
  [14:46:24.854]             newStack[[kk]] <- strategy
  [14:46:24.854]         }
  [14:46:24.854]         stop_if_not(!is.null(newStack), is.list(newStack), length(newStack) >= 
  [14:46:24.854]             1L)
  [14:46:24.854]     }
  [14:46:24.854]     oldStack <- plan_set(newStack, skip = .skip, cleanup = .cleanup, 
  [14:46:24.854]         init = .init)
  [14:46:24.854]     invisible(oldStack)
  [14:46:24.854] }
  [14:46:24.854] <bytecode: 0x000002503ff5c530>
  [14:46:24.854] <environment: 0x000002503ff47c00>
  List of 1
   $ y:List of 1
    ..$ a: chr "hello; 1; 2; ...; 100"
  List of 1
   $ y:List of 1
    ..$ a: chr "hello; 1; 2; ...; 100"
  - future_lapply(x, FUN = listenv::listenv, ...) ...
  $a
  A 'listenv' vector with 1 element ('A').
  
  $b
  A 'listenv' vector with 2 elements ('A', 'B').
  
  List of 1
   $ y0:List of 2
    ..$ a: Named chr "A"
    .. ..- attr(*, "names")= chr "A"
    ..$ b: Named chr [1:2] "A" "B"
    .. ..- attr(*, "names")= chr [1:2] "A" "B"
  - plan('batchtools_local') ...
  List of 1
   $ y:List of 2
    ..$ a: Named chr "A"
    .. ..- attr(*, "names")= chr "A"
    ..$ b: Named chr [1:2] "A" "B"
    .. ..- attr(*, "names")= chr [1:2] "A" "B"
  List of 1
   $ y:List of 2
    ..$ a: Named chr "A"
    .. ..- attr(*, "names")= chr "A"
    ..$ b: Named chr [1:2] "A" "B"
    .. ..- attr(*, "names")= chr [1:2] "A" "B"
  - future_lapply(x, FUN, ...) for large length(x) ...
  - future_lapply() with global in non-attached package ...
  *** future_lapply() ... DONE
  > 
  > source("incl/end.R")
  > 
  > proc.time()
     user  system elapsed 
     3.78    0.51   20.56 
Running the tests in 'tests/zzz.onUnload.R' failed.
Complete output:
  > source("incl/start.R")
  Loading required package: parallelly
  Loading required package: future
  > 
  > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  > # Load and unload of package
  > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  > loadNamespace("future.batchtools")
  <environment: namespace:future.batchtools>
  > 
  > message("*** .onUnload() ...")
  *** .onUnload() ...
  > 
  > libpath <- dirname(system.file(package = "future.batchtools"))
  > future.batchtools:::.onUnload(libpath)
  > 
  > message("*** .onUnload() ... DONE")
  *** .onUnload() ... DONE
  > 
  > source("incl/end.R")
  > 
  > proc.time()
     user  system elapsed 
     1.07    0.21    1.28