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("*** Futures - lazy ...") *** Futures - lazy ... > > 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) + + a <- 42 + f <- future(2 * a, lazy = TRUE) + a <- 21 + ## In future (> 1.14.0), resolved() will launch lazy future, + ## which means for some backends (e.g. sequential) this means + ## that resolved() might end up returning TRUE. + f <- resolve(f) + stopifnot(resolved(f)) + v <- value(f) + stopifnot(v == 84) + + a <- 42 + v %<-% { 2 * a } %lazy% TRUE + a <- 21 + f <- futureOf(v) + ## In future (> 1.14.0), resolved() will launch lazy future, + ## which means for some backends (e.g. sequential) this means + ## that resolved() might end up returning TRUE. + f <- resolve(f) + stopifnot(resolved(f)) + stopifnot(v == 84) + + mprintf("- plan('%s') ... DONE\n", strategy) + } ## for (strategy ...) - plan('batchtools_local') ... [04:38:15.892] Launched future #1 [04:38:17.230] Launched future #1 - plan('batchtools_local') ... DONE > > message("*** Futures - lazy ... DONE") *** Futures - lazy ... DONE > > source("incl/end.R") > > proc.time() user system elapsed 1.48 0.28 3.96