futureverse / future.apply

:rocket: R package: future.apply - Apply Function to Elements in Parallel using Futures
https://future.apply.futureverse.org
211 stars 16 forks source link

is this package by-default run on multicore? #76

Closed ravinder387 closed 3 years ago

ravinder387 commented 3 years ago

plan(multisession) i guess I don't need to write If i'll use this package for make my R package? is it run on multi-core by default but if user want to use in distributed way local network or in cloud.. it is user responsibility. kindly help me

HenrikBengtsson commented 3 years ago

The future framework uses 'sequential' processing by default, which means that future.apply also runs everything sequentially by default. This can be seen by:

> library(future.apply)
Loading required package: future
> plan()
sequential:
- args: function (..., envir = parent.frame())
- tweaked: FALSE
- call: NULL

To run in parallel, the user needs to declare that using the plan() function, e.g.

plan(multisession)

Does this answer your question?

ravinder387 commented 3 years ago

thank you sir..