HenrikBengtsson / future

:rocket: R package: future: Unified Parallel and Distributed Processing in R for Everyone
https://future.futureverse.org
946 stars 82 forks source link

Detect a future parallel backend #711

Closed talegari closed 5 months ago

talegari commented 5 months ago

As a package developer, I need to know if user is using a parallel backend or not. Is there a better way than parallel_flag = !("sequential" %in% class(future::plan())) ?

scottkosty commented 5 months ago

You can see here for one approach.

By the way, I'm curious about your specific use case. Why, as a package developer, do you need to know if the user is using a parallel backend or not?