futureverse / futureverse/doFuture
WISH: Make registerDoFuture() propagate also via future() / %<-% (as it does with %dopar%)
- Dominant language
- R
- Stars
- 83
- Forks
- 7
- PR merge metrics
- No merged PRs in 30d
Description
It would be useful if `registerDoFuture()` would propagate also via `future()` / `%<-%` (as it currently does with `%dopar%`). Currently, it doesn't:
```r
library("doFuture")
registerDoFuture()
plan(multisession)
print(getDoParName())
# [1] "doFuture"
# registerDoFuture() propagates through %dopar%
> a <- foreach(i = 1L) %dopar% getDoParName()
> a
[[1]]
[1] "doFuture"
# But not through plain futures
b %<-% getDoParName()
> b
# [1] NULL
```
The workaround is to manual set it inside these futures:
```r
b %<-% {
registerDoFuture()
getDoParName()
}
> b
# [1] "doFuture"
```
which is not ideal.
# See also
The background for this feature is in https://github.com/HenrikBengtsson/doFuture/issues/21
Contributor guide
Research direction
Reproduce the examples comparing registerDoFuture() through %dopar% with future() / %<-% and read the related background in issue #21. Trace how registration is propagated into foreach workers versus plain futures, then verify that getDoParName() returns "doFuture" in both cases without manual registration inside the future.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- distributed-systems
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100