Skip to content

Commit 1f4635a

Browse files
nbrOfWorkers() for multicore backends would return a 'class' attribute for basic data types - take 2
1 parent 136b72a commit 1f4635a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

R/backend_api-11.MulticoreFutureBackend-class.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ MulticoreFutureBackend <- function(workers = availableCores(constraints = "multi
138138
default_workers <- missing(workers)
139139
if (is.function(workers)) workers <- workers()
140140
stop_if_not(is.numeric(workers))
141-
workers <- structure(as.integer(workers), class = setdiff(class(workers), typeof(workers)))
141+
workers <- structure(as.integer(workers), class = setdiff(class(workers), mode(workers)))
142142
stop_if_not(length(workers) == 1, is.finite(workers), workers >= 1)
143143

144144
## Fall back to sequential futures if only a single additional R process

0 commit comments

Comments
 (0)