Skip to contents

Flags a worker count that can exceed CRAN's two-core limit. Understands parallel, snow, foreach, future, furrr, mirai, RcppParallel, data.table, and BiocParallel.

Usage

lab_core_usage(path, verbose = TRUE, parsed = NULL)

Arguments

path

Character. Path to the package directory. Default: ".".

verbose

Logical. Print diagnostic output. Default: TRUE.

parsed

Optional pre-parsed source, as returned internally by the orchestrator. Defaults to parsing path afresh.

Value

checktor_check_result() with passed, issues, message.

Source

The CRAN Repository Policy states that "If running a package uses multiple threads/cores it must never use more than two simultaneously". See vignette("check-sources", package = "checktor") for how every check maps to its source.

See also

checktor(), which runs this and every other check.

Examples

pkg <- example_diagnose_scenario("code_examples/tf_usage_bad.R",
                                 show_content = FALSE)
lab_core_usage(pkg, verbose = FALSE)$passed
#> [1] TRUE