Package: promises

Joe Cheng

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, cre], Posit Software, PBC [cph, fnd]

promises.pdf |promises.html
promises/json (API)

# Install promises in R:
install.packages('promises', repos = c('', ''))

Peer review:

Bug tracker:

Uses libs:
  • c++– GNU Standard C++ Library v3


23 exports 195 stars 16.81 score 6 dependencies 4129 dependents 539.8k downloads

Last updated 3 months agofrom:e46a4988856e844c16019ddde63223735f9e065e



Advanced future and promises usage

Rendered frompromises_05_future_promise.Rmdusingknitr::rmarkdownon Jun 03 2024.

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

An informal introduction to async programming

Rendered frompromises_02_intro.Rmdusingknitr::rmarkdownon Jun 03 2024.

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

Case study: converting a Shiny app to async

Rendered frompromises_08_casestudy.Rmdusingknitr::rmarkdownon Jun 03 2024.

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

Combining promises

Rendered frompromises_07_combining.Rmdusingknitr::rmarkdownon Jun 03 2024.

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

Launching tasks with future

Rendered frompromises_04_futures.Rmdusingknitr::rmarkdownon Jun 03 2024.

Last update: 2024-04-04
Started: 2023-08-07

Using promises with Shiny

Rendered frompromises_06_shiny.Rmdusingknitr::rmarkdownon Jun 03 2024.

Last update: 2024-04-03
Started: 2023-08-07

Why use promises?

Rendered frompromises_01_motivation.Rmdusingknitr::rmarkdownon Jun 03 2024.

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

Working with promises in R

Rendered frompromises_03_overview.Rmdusingknitr::rmarkdownon Jun 03 2024.

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

Readme and manuals

Help Manual

Help pageTopics
'future' promisefuture_promise future_promise_queue
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
Promise domainsnew_promise_domain with_promise_domain