Package: promises 1.5.0.9000

Barret Schloerke

promises: Abstractions for Promise-Based Asynchronous Programming

Provides fundamental abstractions for doing asynchronous programming in R using promises. Asynchronous programming is useful for allowing a single R process to orchestrate multiple tasks in the background while also attending to something else. Semantics are similar to 'JavaScript' promises, but with a syntax that is idiomatic R.

Authors:Joe Cheng [aut], Barret Schloerke [aut, cre], Winston Chang [aut], Charlie Gao [aut], Posit Software, PBC [cph, fnd]

promises_1.5.0.9000.tar.gz
promises_1.5.0.9000.zip(r-4.7)promises_1.5.0.9000.zip(r-4.6)promises_1.5.0.9000.zip(r-4.5)
promises_1.5.0.9000.tgz(r-4.6-any)promises_1.5.0.9000.tgz(r-4.5-any)
promises_1.5.0.9000.tar.gz(r-4.7-any)promises_1.5.0.9000.tar.gz(r-4.6-any)
promises_1.5.0.9000.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
promises/json (API)

# Install 'promises' in R:
install.packages('promises', repos = c('https://rstudio.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/rstudio/promises/issues

Pkgdown/docs site:https://rstudio.github.io

On CRAN:

Conda:

promises

18.44 score 210 stars 2.9k packages 1.8k scripts 837k downloads 30 exports 9 dependencies

Last updated from:e430def124. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64OK127
source / vignettesOK228
linux-release-x86_64OK133
macos-release-arm64OK89
macos-oldrel-arm64OK122
windows-develOK110
windows-releaseOK78
windows-oldrelOK94
wasm-releaseOK151

Exports:%...!%%...>%%...T!%%...T>%%>%%T>%as.promisecatchfinallyfuture_promisefuture_promise_queuehybrid_thenis.promiseis.promisinglocal_ospan_promise_domainlocal_otel_promise_domainnew_promise_domainpromisepromise_allpromise_mappromise_racepromise_reducepromise_rejectpromise_resolvethenwith_ospan_asyncwith_ospan_promise_domainwith_otel_promise_domainwith_otel_spanwith_promise_domain

Dependencies:clifastmaplaterlifecyclemagrittrotelR6Rcpprlang

Advanced future and promises usage
The problem with future()+promise() | The solution: future_promise()

Last update: 2026-06-27
Started: 2025-06-26

An informal introduction to async programming

Last update: 2025-07-31
Started: 2023-08-07

Case study: converting a Shiny app to async
Motivation | Our source data | A tour of the app | The implementation | User interface | Server logic | Improving performance and scalability | Converting to async | Loading promises and mirai | The data reactive: mirai() all the things | The whales reactive: simple pipelines are simple | The whale_downloads reactive: reading from multiple promises | Promises: the Gathering | The total_downloaders value box: simple pipelines are for output, too | The biggest_whales plot: getting untidy | Revisiting the data reactive: progress support | Measuring scalability | Load testing with Shiny (coming soon) | Sync vs. async performance | Further optimizations | Summing up

Last update: 2025-07-31
Started: 2023-08-07

Combining promises
Gathering | Nesting | Racing | Mapping | Reducing

Last update: 2025-07-31
Started: 2023-08-07

Launching tasks with mirai
How mirai works | Choosing a launch method | Caveats and limitations | Globals: Providing input to mirai code chunks | Package loading | Custom Data Types | Native resources | Mutation | Returning values

Last update: 2025-07-31
Started: 2025-06-26

Using promises with Shiny
Adding prerequisites | Identifying slow operations | Converting a slow operation into a mirai | Shiny-specific caveats and limitations | Integrating promises with Shiny | Outputs | Render functions with side effects: renderPrint and renderPlot | Observers | Reactive expressions | The flush cycle

Last update: 2025-07-31
Started: 2023-08-07

Working with promises in R
Async programming in R | Promises: the central abstraction of async programming | Accessing results with then | Promise chaining | Tee operator | Error handling | Catching errors with onRejected | Default onRejected behavior | Syntactic sugar for onRejected | Error tee | Cleaning up with finally

Last update: 2025-07-31
Started: 2023-08-07

Launching tasks with future
How future works | Choosing a launch method | Caveats and limitations | Globals: Providing input to future code chunks | Package loading | Native resources | Mutation | Returning values

Last update: 2025-07-01
Started: 2025-06-26

Why use promises?
What are promises good for? | What aren't promises good for?

Last update: 2023-08-10
Started: 2023-08-07

Readme and manuals

Help Manual

Help pageTopics
'future' promisefuture_promise future_promise_queue
Asynchronous or synchronous 'then()'hybrid_then
Coerce to a promiseas.promise is.promise is.promising
Promise pipe operators%...!% %...>% %...T!% %...T>% pipes
Create a new promise objectpromise
Combine multiple promise objectspromise_all promise_race
Promise-aware lapply/mappromise_map
Promise-aware version of Reducepromise_reduce
Create a resolved or rejected promisepromise_reject promise_resolve
Access the results of a promisecatch finally then
OpenTelemetry integrationlocal_otel_promise_domain with_otel_promise_domain with_otel_span
Promise domainsnew_promise_domain with_promise_domain