async_try_each | R Documentation |
It runs each task in series but stops whenever any of the functions were successful. If one of the tasks were successful, the callback will be passed the result of the successful task. If all tasks fail, the callback will be passed the error and result (if any) of the final attempt.
async_try_each(..., .list = list())
... |
Deferred values to run in series. |
.list |
More deferred values to run, |
Resolves to the result of the first successful deferred.
Otherwise throws an error. The error objects of all failed deferreds
will be in the errors
member of the error object.
Other async control flow:
async_backoff()
,
async_reflect()
,
async_retry()
,
async_retryable()
,
async_sequence()
,
async_until()
,
async_whilst()
do <- function() {
async_try_each(
async(function() stop("doh"))(),
async(function() "cool")(),
async(function() stop("doh2"))(),
async(function() "cool2")()
)
}
synchronise(do())
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.