R version 4.5.0 beta (2025-03-29 r88074 ucrt) -- "How About a Twenty-Six" 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. > library(future.tests) > library(future) > > test_plans <- test_plans() > print(test_plans) list() > > add_test_plan(plan(sequential)) > add_test_plan(plan(multisession, workers = 1L)) > add_test_plan(plan(multisession, workers = 2L)) > > test_plans <- test_plans() > print(test_plans) [[1]] plan(sequential) [[2]] plan(multisession, workers = 1L) [[3]] plan(multisession, workers = 2L) > stopifnot(length(test_plans) == 3L) > > res <- along_test_plans({ 42L }) Evaluating expression under future plan #1 of 3 ... sequential: - args: function (..., envir = parent.frame(), workers = "") - tweaked: FALSE - call: plan(sequential) Evaluating expression under future plan #1 of 3 ... DONE Evaluating expression under future plan #2 of 3 ... multisession: - args: function (..., workers = 1L, envir = parent.frame()) - tweaked: TRUE - call: plan(multisession, workers = 1L) Evaluating expression under future plan #2 of 3 ... DONE Evaluating expression under future plan #3 of 3 ... multisession: - args: function (..., workers = 2L, envir = parent.frame()) - tweaked: TRUE - call: plan(multisession, workers = 2L) Evaluating expression under future plan #3 of 3 ... DONE > print(res) [[1]] [1] 42 [[2]] [1] 42 [[3]] [1] 42 > > proc.time() user system elapsed 1.87 0.12 2.84