Skip to content

Commit

Permalink
Fix a few more detritus issues [#719]
Browse files Browse the repository at this point in the history
  • Loading branch information
HenrikBengtsson committed May 30, 2024
1 parent 2895654 commit 74ebf91
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: future
Version: 1.33.2-9005
Version: 1.33.2-9006
Title: Unified Parallel and Distributed Processing in R for Everyone
Imports:
digest,
Expand Down
7 changes: 5 additions & 2 deletions tests/Future-class.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ stopifnot(is.call(expr))

clazzes <- list(
sequential = SequentialFuture,
multisession = function(...) MultisessionFuture(..., workers = 2L),
multisession = function(...) MultisessionFuture(..., workers = I(1L)),
sequential = SequentialFuture
)
if (supportsMulticore()) {
clazzes$multicore = function(...) MulticoreFuture(..., workers = 2L)
clazzes$multicore = function(...) MulticoreFuture(..., workers = I(1L))
}

for (clazz in clazzes) {
Expand All @@ -48,6 +48,9 @@ for (clazz in clazzes) {
v <- value(f)
print(v)
stopifnot(v == 42L)

## To avoid 'multisession' from leaving stray workers behind
ClusterRegistry(action = "stop")
}

message("*** Future class - exception ... DONE")
Expand Down
4 changes: 4 additions & 0 deletions tests/globals,NSE.R
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ for (strategy in supportedStrategies()) {
} %lazy% TRUE
stopifnot(identical(v3, v0))

## Make sure to shut down nested parallel workers
void %<-% { plan(sequential) }
print(void)

message(sprintf("- Strategy: %s ... DONE", strategy))
}

Expand Down

0 comments on commit 74ebf91

Please sign in to comment.