File tree Expand file tree Collapse file tree 3 files changed +41
-2
lines changed Expand file tree Collapse file tree 3 files changed +41
-2
lines changed Original file line number Diff line number Diff line change 1
1
Package: future
2
- Version: 1.25.0-9009
2
+ Version: 1.25.0-9010
3
3
Title: Unified Parallel and Distributed Processing in R for Everyone
4
4
Imports:
5
5
digest,
@@ -10,6 +10,7 @@ Imports:
10
10
tools,
11
11
utils
12
12
Suggests:
13
+ methods,
13
14
RhpcBLASctl,
14
15
R.rsp,
15
16
markdown
Original file line number Diff line number Diff line change 1
1
Package: future
2
2
===============
3
3
4
- Version: 1.25.0-9009 [2022-05-03 ]
4
+ Version: 1.25.0-9010 [2022-05-06 ]
5
5
6
6
SIGNIFICANT CHANGES:
7
7
Original file line number Diff line number Diff line change
1
+ source(" incl/start.R" )
2
+ library(methods )
3
+
4
+ keepWhere <- getOption(" future.globals.keepWhere" )
5
+
6
+ message(" *** Globals - S4 methods ..." )
7
+
8
+ setGeneric ("my_fcn ", function(x) {
9
+ standardGeneric(" my_fcn" )
10
+ })
11
+
12
+ setMethod ("my_fcn ", methods::signature(x = "numeric"), function(x) {
13
+ x ^ 2
14
+ })
15
+
16
+ truth <- my_fcn(3 )
17
+
18
+ for (strategy in supportedStrategies()) {
19
+ message(" Type of future: " , strategy )
20
+ plan(strategy )
21
+
22
+ # # FIXME: https://github.com/HenrikBengtsson/future/issues/615
23
+ if (strategy %in% c(" sequential" , " multicore" )) {
24
+ options(future.globals.keepWhere = TRUE )
25
+ }
26
+
27
+ f <- future({ my_fcn(3 ) })
28
+ v <- value(f )
29
+ print(v )
30
+ stopifnot(v == truth )
31
+
32
+ # # Make sure to reset option, if changed
33
+ options(future.globals.keepWhere = keepWhere )
34
+ }
35
+
36
+ message(" *** Globals - S4 methods ... DONE" )
37
+
38
+ source(" incl/end.R" )
You can’t perform that action at this time.
0 commit comments