Skip to content

Commit

Permalink
Register internal globals() and packages() as S3 methods for 'Future'
Browse files Browse the repository at this point in the history
  • Loading branch information
HenrikBengtsson committed Feb 4, 2024
1 parent d6f6283 commit 3885693
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: future
Version: 1.33.1-9003
Version: 1.33.1-9004
Title: Unified Parallel and Distributed Processing in R for Everyone
Imports:
digest,
Expand Down Expand Up @@ -39,5 +39,6 @@ LazyLoad: TRUE
ByteCompile: TRUE
URL: https://future.futureverse.org, https://github.com/HenrikBengtsson/future
BugReports: https://github.com/HenrikBengtsson/future/issues
Encoding: UTF-8
RoxygenNote: 7.3.1
Roxygen: list(markdown = TRUE)
2 changes: 2 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ S3method(getExpression,Future)
S3method(getExpression,MulticoreFuture)
S3method(getExpression,MultisessionFuture)
S3method(getExpression,UniprocessFuture)
S3method(globals,Future)
S3method(journal,Future)
S3method(journal,FutureJournal)
S3method(journal,FutureJournalCondition)
Expand All @@ -35,6 +36,7 @@ S3method(nbrOfWorkers,cluster)
S3method(nbrOfWorkers,future)
S3method(nbrOfWorkers,multiprocess)
S3method(nbrOfWorkers,uniprocess)
S3method(packages,Future)
S3method(plot,Mandelbrot)
S3method(print,Future)
S3method(print,FutureCondition)
Expand Down
2 changes: 2 additions & 0 deletions R/Future-class.R
Original file line number Diff line number Diff line change
Expand Up @@ -851,12 +851,14 @@ getExpression.Future <- local({

globals <- function(future, ...) UseMethod("globals")

#' @exportS3Method
globals.Future <- function(future, ...) {
future[["globals"]]
}

packages <- function(future, ...) UseMethod("packages")

#' @exportS3Method
packages.Future <- function(future, ...) {
future[["packages"]]
}
Expand Down

0 comments on commit 3885693

Please sign in to comment.