Skip to content

Commit 8d5b342

Browse files
cluster,multisession: Suppress warning produced by serialize()
1 parent 9a380e3 commit 8d5b342

File tree

3 files changed

+17
-6
lines changed

3 files changed

+17
-6
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Package: future
2-
Version: 1.49.0-9028
2+
Version: 1.49.0-9029
33
Title: Unified Parallel and Distributed Processing in R for Everyone
44
Depends:
55
R (>= 3.2.0)

NEWS.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,17 @@
2323
worker, which therefore also terminates the future.
2424

2525
* `future()` arguments `stdout` and `conditions` were not applied
26-
when packages that are specified via argument `packages` where
26+
when packages that were specified via argument `packages` were
2727
loaded and attached. This prevented us from excluding, for
2828
instance, `packageStartupMessage`:s, causing them to be displayed
2929
in sequential and multicore processing.
3030

31-
* Now the ClusterFutureBackend tries even harder to shut down
31+
* When the using `cluster` and `multisession` backends, one could, in
32+
some cases, end up with warnings on "package may not be available
33+
when loading" that are produced by `serialize()`. These type of
34+
warnings are now suppressed.
35+
36+
* Now the cluster future backend tries even harder to shut down
3237
parallel cluster workers when shutting down the backend. If it
3338
fails to communicate with one or more of the parallel workers, it
3439
will now close any socket connections that remain open towards such

R/backend_api-11.ClusterFutureBackend-class.R

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1095,7 +1095,9 @@ requestNode <- function(await, backend, timeout, delta, alpha) {
10951095
okay <- TRUE
10961096
truth <- "future:::requestNode() validation call"
10971097
res <- tryCatch({
1098-
clusterCall(cl = cl, function(x) x, truth)[[1]]
1098+
suppressWarnings({
1099+
clusterCall(cl = cl, function(x) x, truth)[[1]]
1100+
})
10991101
}, error = identity)
11001102
## If not working, investigate why, and relaunch a new worker
11011103
if (inherits(res, "error") || !identical(res, truth)) {
@@ -1195,7 +1197,9 @@ node_call_nonblocking <- local({
11951197

11961198
function(node, ..., when = "send call to", future) {
11971199
tryCatch({
1198-
sendCall(node, ...)
1200+
suppressWarnings({
1201+
sendCall(node, ...)
1202+
})
11991203
}, error = function(ex) {
12001204
msg <- post_mortem_cluster_failure(ex, when = when, node = node, future = future)
12011205
ex <- FutureError(msg, future = future)
@@ -1210,7 +1214,9 @@ cluster_call_blocking <- function(cl, ..., when = "call function on", future, ex
12101214
stop_if_not(inherits(future, "Future"))
12111215

12121216
ans <- tryCatch({
1213-
clusterCall(cl = cl, ...)
1217+
suppressWarnings({
1218+
clusterCall(cl = cl, ...)
1219+
})
12141220
}, error = function(ex) {
12151221
msg <- post_mortem_cluster_failure(ex, when = when, node = cl[[1]], future = future)
12161222
ex <- FutureError(msg, future = future)

0 commit comments

Comments
 (0)