Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add useFuture() instead of options(future=...) #2

Closed
HenrikBengtsson opened this issue Jun 10, 2015 · 1 comment
Closed

Add useFuture() instead of options(future=...) #2

HenrikBengtsson opened this issue Jun 10, 2015 · 1 comment

Comments

@HenrikBengtsson
Copy link
Owner

Add useFuture() instead of options(future=...) with the advantage of immediate validation and lookup, e.g.

useFuture(lazy)
useFuture("lazy")
useFuture(eager)
useFuture(c("lazy", "eager")[2])

But then, how to check which future is in use? Is there a better name than useFuture().

@HenrikBengtsson
Copy link
Owner Author

What about plan(), which works for both setting and getting, e.g.

> plan(lazy)
> plan("lazy")
> plan()
"lazy"

Also, make it easy to modify the default arguments of a future evaluator function, e.g.

plan(eager, local=FALSE)

Internally, this will do something like:

eager_tmp <- eager
formals(eager_tmp)$local <- FALSE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant