Commit 929143f
Add
* Non-blocking concept
* Update unrelated tabPanel test snapshot
* Review user interface
* Review internal methods
* Tighten later loop for performance
* Silence tests
* Cleanup pass
* Rename internal function
* Use combined error message
* Consolidate two on.exit() clauses
* Fix cleanup step and add regression test
* Add documentation about running the later loop
* Default to non-blocking for LLMs
* Auto-stop upon new `runApp()`
* Update news and docs
* Refactor pass
* Make `handle$stop()` idempotent
* Simplify `serviceAsync()`
* Minimize changes to `on.exit()` handlers
* Move cleanup func creation
* Consistent cleanup order
* Apply review changes from @cpsievert and @schloerke
* Make non-default for LLMs
* `devtools::document()` (GitHub Actions)
* Update news
* Use generation invalidation for loops
* Move generation increment before the blocking/non-blocking branch
* Have `handle$stop()` method handle setting of `stopped` flag
* Amend currently running message
* Apply suggestions from code review
Co-authored-by: Carson Sievert <cpsievert1@gmail.com>
* Separate out non-blocking into `startApp()`
* Amend `stopApp()` docs
* Add `startApp()` to pkgdown.yml
* Fix stale variable name in test comment
* Move option resolution into `.setupShinyApp()`
Aligns `startApp()` with `runApp()` by setting `options(warn,
pool.scheduler)` before `as.shiny.appobj()` and passing `ops` through.
Folds the `findVal` precedence block into `.setupShinyApp()`; missingness
is checked in the caller's frame via a `caller = parent.frame()` default
arg, since `runApp()`/`startApp()` formals carry defaults.
* Scope OTEL promise domain to `startApp()` setup and service loop
`local_otel_promise_domain()` binds the domain to the caller's frame,
which in `startApp()` exits before any request is served. A persistent
global install would leak into unrelated user promises between ticks.
Wrap the synchronous setup phase and each service iteration in
`with_otel_promise_domain()`. Callbacks are wrapped at registration
time, so promises created during `onStart`, handlers, and observers
stay instrumented when they fire. The domain is dormant between ticks,
so it stays out of user promises at the console.
* fix(startApp): preserve stopApp() called during setup
* docs(startApp): clarify relationship to stopApp()
* `devtools::document()` (GitHub Actions)
* perf(startApp): replace 1ms polling with adaptive serviceApp(NA) scheduling
* `usethis::use_tidy_description()` (GitHub Actions)
* fix(startApp): error on nested launch from app code
* Add comment about finalizer reachability
* Add note in docs about auto-replacement
* Update news
---------
Co-authored-by: shikokuchuo <shikokuchuo@users.noreply.github.com>
Co-authored-by: Carson Sievert <cpsievert1@gmail.com>startApp() for non-blocking app execution (#4349)1 parent ab02739 commit 929143f
11 files changed
Lines changed: 880 additions & 85 deletions
File tree
- R
- man
- tests/testthat
- tools/documentation
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
| 130 | + | |
130 | 131 | | |
131 | 132 | | |
132 | 133 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
276 | 276 | | |
277 | 277 | | |
278 | 278 | | |
| 279 | + | |
279 | 280 | | |
280 | 281 | | |
281 | 282 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
5 | 10 | | |
6 | 11 | | |
7 | 12 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
0 commit comments