Repository navigation
updated helpers for parallel processing - #1028
Conversation
|
|
||
| # ------------------------------------------------------------------------------ | ||
|
|
||
| has_non_par_pkgs <- function(object, control, verbose = FALSE) { |
There was a problem hiding this comment.
I don't think that we'll expose verbose to users but we might want it internally.
|
We are in the middle of major surgery with this repo so I would concentrate on these two files: |
simonpcouch
left a comment
There was a problem hiding this comment.
This seems reasonable!
Leaving review as Comment not to request re-review before merging or anything, but just to indicate that I don't have enough familiarity with the codebase at this point to confidently endorse!
| } | ||
| mirai_avail <- function() { | ||
| any(search() == "package:mirai") | ||
| } |
There was a problem hiding this comment.
It's possible to set daemons without loading the mirai package, and same to plan without future loaded. Could the logic here just be based on the information in future::nbrOfWorkers() and mirai::status()? Checking whether the packages are loaded feels like an unusual mechanism.
There was a problem hiding this comment.
The plan is for both mirai and future to be in suggests so someone will have to install both even if they don't want to run in parallel.
shikokuchuo
left a comment
There was a problem hiding this comment.
Looks great, I've provided some suggestions in the comments.
Co-authored-by: Simon P. Couch <simonpatrickcouch@gmail.com> Co-authored-by: Charlie Gao <53399081+shikokuchuo@users.noreply.github.com>
Co-authored-by: Charlie Gao <53399081+shikokuchuo@users.noreply.github.com>
Co-authored-by: Simon P. Couch <simonpatrickcouch@gmail.com>
Co-authored-by: Simon P. Couch <simonpatrickcouch@gmail.com>
Co-authored-by: Simon P. Couch <simonpatrickcouch@gmail.com>
|
This pull request has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue. |
Some basic helper functions to determine when and how to use parallel processing.
Docs are updated too.
The next step is to update
loop_call()with the additional logic. I'll make updates to this branch for that.