Skip to content

Commit e7de4bb

Browse files
CLEANUP: run() for ClusterFuture no longer export globals; that's take care of by the new getExpression()/evalFuture()
1 parent 7a055e2 commit e7de4bb

File tree

2 files changed

+1
-42
lines changed

2 files changed

+1
-42
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.34.0-9104
2+
Version: 1.34.0-9105
33
Title: Unified Parallel and Distributed Processing in R for Everyone
44
Imports:
55
digest,

R/ClusterFuture-class.R

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -175,47 +175,6 @@ run.ClusterFuture <- function(future, ...) {
175175
)
176176
}
177177

178-
## (iii) Export globals
179-
globals <- globals(future)
180-
if (length(globals) > 0) {
181-
t_start <- Sys.time()
182-
if (debug) {
183-
total_size <- asIEC(objectSize(globals))
184-
mdebugf("Exporting %d global objects (%s) to cluster node #%d ...", length(globals), total_size, node_idx)
185-
}
186-
for (name in names(globals)) {
187-
## For instance sendData.SOCKnode(...) may generate warnings
188-
## on packages not being available after serialization, e.g.
189-
## In serialize(data, node$con) :
190-
## package:future' may not be available when loading
191-
## Here we'll suppress any such warnings.
192-
value <- globals[[name]]
193-
if (debug) {
194-
size <- asIEC(objectSize(value))
195-
mdebugf("Exporting %s (%s) to cluster node #%d ...", sQuote(name), size, node_idx)
196-
}
197-
suppressWarnings({
198-
cluster_call(cl, fun = gassign, name, value, future = future, when = "call gassign() on")
199-
})
200-
if (debug) mdebugf("Exporting %s (%s) to cluster node #%d ... DONE", sQuote(name), size, node_idx)
201-
value <- NULL
202-
}
203-
if (debug) mdebugf("Exporting %d global objects (%s) to cluster node #%d ... DONE", length(globals), total_size, node_idx)
204-
205-
if (inherits(future$.journal, "FutureJournal")) {
206-
appendToFutureJournal(future,
207-
event = "exportGlobals",
208-
category = "overhead",
209-
parent = "launch",
210-
start = t_start,
211-
stop = Sys.time()
212-
)
213-
}
214-
}
215-
## Not needed anymore
216-
globals <- NULL
217-
218-
219178
## Add to registry
220179
FutureRegistry(reg, action = "add", future = future, earlySignal = FALSE)
221180

0 commit comments

Comments
 (0)