Skip to content

Commit ef911bf

Browse files
Make sure plan(multicore, workers = TRUE) is an error also with the new FutureBackend
1 parent eb10ffc commit ef911bf

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

R/backend_api-MulticoreFutureBackend-class.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
MulticoreFutureBackend <- function(workers = availableCores(constraints = "multicore"), ...) {
1313
default_workers <- missing(workers)
1414
if (is.function(workers)) workers <- workers()
15+
stop_if_not(is.numeric(workers))
1516
workers <- structure(as.integer(workers), class = class(workers))
1617
stop_if_not(length(workers) == 1, is.finite(workers), workers >= 1)
1718

0 commit comments

Comments
 (0)