Skip to content

Please undo plan() changes + consider parallelly::supportsMulticore() #6

@HenrikBengtsson

Description

@HenrikBengtsson

Hello. You're using

if (Sys.info()[["sysname"]] == "Windows") {plan(multisession)} else {plan(multicore)}

without undoing those future plan changes. Note that the user might have already set another plan. See https://future.futureverse.org/articles/future-7-for-package-developers.html#avoid-changing-the-future-backend for how to undo these changes automatically, and why it's important.

Also, you may want to use parallelly::supportsMulticore() instead of looking at Sys.info()[["sysname"]] == "Windows". See https://parallelly.futureverse.org/reference/supportsMulticore.html for details.

In summary, please consider updating to:

#' @importFrom parallelly supportsMulticore
with(if (supportsMulticore()) { plan(multicore) } else { plan(multisession) }, local = TRUE)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions