This is equivalent to using the $then()
method of a deferred, but
it is easier to use programmatically.
async_sequence(..., .list = NULL)
Asynchronous function, the composition of all input functions.
They are performed left to right, the ones in .list
are the last
ones.
Other async control flow:
async_backoff()
,
async_reflect()
,
async_retry()
,
async_retryable()
,
async_try_each()
,
async_until()
,
async_whilst()
# \donttest{
check_url <- async_sequence(
http_head, function(x) identical(x$status_code, 200L))
synchronise(check_url("https://eu.httpbin.org/status/404"))
#> [1] FALSE
synchronise(check_url("https://eu.httpbin.org/status/200"))
#> [1] TRUE
# }