Skip to content

Commit

Permalink
version and news
Browse files Browse the repository at this point in the history
  • Loading branch information
wlandau committed Jun 5, 2024
1 parent 07fd02f commit 35e3e44
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 11 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Description: In computationally demanding analysis projects,
'clustermq' by Schubert (2019) <doi:10.1093/bioinformatics/btz284>),
and 'batchtools' by Lang, Bischel, and Surmann (2017)
<doi:10.21105/joss.00135>.
Version: 0.9.3.9000
Version: 0.9.3.9001
License: MIT + file LICENSE
URL: https://wlandau.github.io/crew/, https://github.com/wlandau/crew
BugReports: https://github.com/wlandau/crew/issues
Expand Down
4 changes: 2 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# crew 0.9.3.9000 (development)

# crew 0.9.3.9001 (development)

* Do not use extended tasks in Shiny vignette.

# crew 0.9.3

Expand Down
20 changes: 12 additions & 8 deletions vignettes/shiny.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -174,12 +174,14 @@ The previous app feels choppy because it only refreshes every half second. Using
The revised app has two changes. First, it takes `mirai` task returned by `controller$push()` and turns it into a special [`promise`](https://rstudio.github.io/promises/). This [`promise`](https://rstudio.github.io/promises/) updates the coin flip counts as soon as the flip finishes.

```r
observeEvent(input$button, {
for (task in seq_len(1000)) {
observeEvent(
input$button,
replicate(
1000,
controller$push(flip_coin(), data = list(flip_coin = flip_coin)) %...>%
collect_flips(controller, flips)
}
})
)
)
```

The `collect_flips()` function collects all the finished flips and updates the flip counts.
Expand Down Expand Up @@ -229,12 +231,14 @@ server <- function(input, output, session) {
flips <- reactiveValues(heads = 0, tails = 0, total = 0)

# Flip a batch of coins when the button is pressed.
observeEvent(input$button, {
for (task in seq_len(1000)) {
observeEvent(
input$button,
replicate(
1000,
controller$push(flip_coin(), data = list(flip_coin = flip_coin)) %...>%
collect_flips(controller, flips)
}
})
)
)

# Print time and flip counts.
output$results <- renderText({
Expand Down

0 comments on commit 35e3e44

Please sign in to comment.