We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 624fff1 commit 39b8735Copy full SHA for 39b8735
R/options.R
@@ -12,7 +12,7 @@ setThreadOptions <- function(numThreads = "auto", stackSize = "auto") {
12
13
# validate and resolve stackSize
14
if (identical(stackSize, "auto"))
15
- stackSize = 0L
+ stackSize <- 0L
16
else if (!is.numeric(stackSize))
17
stop("stackSize must be an integer")
18
else
@@ -24,7 +24,9 @@ setThreadOptions <- function(numThreads = "auto", stackSize = "auto") {
24
PACKAGE = "RcppParallel"))
25
}
26
27
- if (numThreads != -1)
+ if (numThreads == -1L)
28
+ Sys.unsetenv("RCPP_PARALLEL_NUM_THREADS")
29
+ else
30
Sys.setenv(RCPP_PARALLEL_NUM_THREADS = numThreads)
31
32
0 commit comments