File tree Expand file tree Collapse file tree 5 files changed +56
-4
lines changed
Expand file tree Collapse file tree 5 files changed +56
-4
lines changed Original file line number Diff line number Diff line change 11Package: future.batchtools
22==========================
33
4- Version: 0.4.0-9000 [2017-05-16 ]
4+ Version: 0.4.0-9000 [2017-06-01 ]
55
66 o ...
77
Original file line number Diff line number Diff line change 11source(" incl/start.R" )
2- supportedStrategies <- future ::: supportedStrategies
32
43message(" *** Futures - labels ..." )
54
6- strategies <- supportedStrategies()
7- strategies <- setdiff(strategies , " multiprocess" )
85strategies <- c(" batchtools_local" )
96
107for (strategy in strategies ) {
Original file line number Diff line number Diff line change 1+ source(" incl/start.R" )
2+
3+ message(" *** Futures - lazy ..." )
4+
5+ strategies <- c(" batchtools_local" )
6+
7+ for (strategy in strategies ) {
8+ mprintf(" - plan('%s') ..." , strategy )
9+ plan(strategy )
10+
11+ a <- 42
12+ f <- future(2 * a , lazy = TRUE )
13+ a <- 21
14+ v <- value(f )
15+ stopifnot(v == 84 )
16+
17+ a <- 42
18+ v %<- % { 2 * a } %lazy % TRUE
19+ a <- 21
20+ stopifnot(v == 84 )
21+
22+ mprintf(" - plan('%s') ... DONE" , strategy )
23+ } # # for (strategy ...)
24+
25+ message(" *** Futures - lazy ... DONE" )
26+
27+ source(" incl/end.R" )
Original file line number Diff line number Diff line change 1+ source(" incl/start.R" )
2+
3+ message(" *** %resources% ..." )
4+
5+ plan(batchtools_local )
6+
7+ # # This will test `%resources%` but it'll be ignored
8+ # # (with a warning) by batchtools_local()
9+ y %<- % { 42 } %resources % list (mem = " 42gb" )
10+
11+ message(" *** %resources% ... DONE" )
12+
13+ source(" incl/end.R" )
Original file line number Diff line number Diff line change 1+ source(" incl/start.R" )
2+
3+ # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
4+ # Load and unload of package
5+ # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
6+ loadNamespace(" future.batchtools" )
7+
8+ message(" *** .onUnload() ..." )
9+
10+ libpath <- dirname(system.file(package = " future.batchtools" ))
11+ future.batchtools ::: .onUnload(libpath )
12+
13+ message(" *** .onUnload() ... DONE" )
14+
15+ source(" incl/end.R" )
You can’t perform that action at this time.
0 commit comments