Skip to content

Commit

Permalink
Woops - we only want to apply suppressWarnings() to selectChildren() …
Browse files Browse the repository at this point in the history
…and mccollect() [#218]
  • Loading branch information
HenrikBengtsson committed Nov 9, 2018
1 parent 9153907 commit 2f4225e
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -233,15 +233,16 @@ importParallel <- local({

res <- get(name, mode = "function", envir = ns, inherits = FALSE)

if (getRversion() >= "3.5.0" && getRversion() <= "3.5.1") {
if (name %in% c("mccollect", "selectChildren") &&
getRversion() >= "3.5.0" && getRversion() <= "3.5.1") {
## Suppress warnings produced by parallel::mccollect() and
## parallel::selectChildren() in R 3.5.0 and and R 3.5.1
## (https://github.com/HenrikBengtsson/future/issues/218), e.g.
##
## parallel::selectChildren() in R 3.5.0 and and R 3.5.1
## (https://github.com/HenrikBengtsson/future/issues/218), e.g.
##
## "Warning in selectChildren(pids[!fin], -1) :
## cannot wait for child 32193 as it does not exist"
##
res_org <- res
##
res_org <- res
res <- function(...) suppressWarnings(res_org(...))
}

Expand Down

0 comments on commit 2f4225e

Please sign in to comment.