Skip to content

Commit 4d3d969

Browse files
authored
Bump mirai version requirement (#1227)
* Bump mirai version requirement * Update purrr vignette to use synchronous daemons
1 parent dca5b5a commit 4d3d969

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Suggests:
2828
httr,
2929
knitr,
3030
lubridate,
31-
mirai (>= 2.5.0),
31+
mirai (>= 2.5.1),
3232
rmarkdown,
3333
testthat (>= 3.0.0),
3434
tibble,

R/parallelization.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ parallel_pkgs_installed <- function() {
187187
{
188188
check_installed(
189189
c("carrier", "mirai"),
190-
version = c("0.3.0", "2.5.0"),
190+
version = c("0.3.0", "2.5.1"),
191191
reason = "for parallel map."
192192
)
193193
the$parallel_pkgs_installed <- TRUE

vignettes/purrr.Rmd

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,7 @@ mirai::daemons(6)
8787

8888
```{r}
8989
#| echo: false
90-
# Can be updated to mirai::daemons(sync = TRUE) once mirai >= 2.5.1 is released
91-
mirai::daemons(1, dispatcher = FALSE)
90+
mirai::daemons(sync = TRUE)
9291
```
9392

9493
(You only need to do this once per session.)
@@ -119,6 +118,11 @@ out <- map(by_cyl, in_parallel(\(df) my_lm(mpg ~ disp, data = df), my_lm = my_lm
119118

120119
Learn more about parallel computing in `?in_parallel`.
121120

121+
```{r}
122+
#| echo: false
123+
mirai::daemons(0)
124+
```
125+
122126
### Output variants
123127

124128
purrr functions are type-stable, which means it's easy to predict what type of output they return, e.g., `map()` always returns a list. But what if you want a different type of output? That's where the output variants come into play:

0 commit comments

Comments
 (0)