R Under development (unstable) (2024-07-26 r86926 ucrt) -- "Unsuffered Consequences" Copyright (C) 2024 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") > library(parallel) Attaching package: 'parallel' The following object is masked _by_ '.GlobalEnv': detectCores > options(parallelly.debug = FALSE) > > message("*** isForkedChild() ...") *** isForkedChild() ... > > stopifnot(!isForkedChild()) > > if (supportsMulticore()) { + message("- mcparallel()/mccollect()") + f <- mcparallel(isForkedChild()) + isForked <- mccollect(f)[[1]] + stopifnot(isForked) + + message("- makeForkCluster()") + cl <- makeForkCluster(1L) + isForked <- clusterEvalQ(cl, { parallelly::isForkedChild() }) + isForked <- unlist(isForked, use.names = FALSE) + stopifnot(isForked) + parallel::stopCluster(cl) + } > > message("- mclapply()") - mclapply() > isForked <- mclapply(1:2, FUN = function(ii) isForkedChild()) > isForked <- unlist(isForked, use.names = FALSE) > if (supportsMulticore()) { + stopifnot(all(isForked)) + } else { + stopifnot(!any(isForked)) + } > > message("- makeClusterPSOCK()") - makeClusterPSOCK() > cl <- makeClusterPSOCK(1L) > isForked <- clusterEvalQ(cl, { parallelly::isForkedChild() }) > isForked <- unlist(isForked, use.names = FALSE) > stopifnot(!isForked) > parallel::stopCluster(cl) > > message("*** isForkedChild() ... DONE") *** isForkedChild() ... DONE > > source("incl/end.R") > > proc.time() user system elapsed 0.28 0.09 1.23