when_all | R Documentation |
Create a deferred value that is resolved when all listed deferred values
are resolved. Note that the error of an input deferred value
triggers the error when_all
as well.
when_all(..., .list = list())
... |
Deferred values. |
.list |
More deferred values. |
async has auto-cancellation, so if one deferred value errors, the rest of them will be automatically cancelled.
A deferred value, that is conditioned on all deferred values
in ...
and .list
.
when_any()
, when_some()
## Check that the contents of two URLs are the same
afun <- async(function() {
u1 <- http_get("https://eu.httpbin.org")
u2 <- http_get("https://eu.httpbin.org/get")
when_all(u1, u2)$
then(function(x) identical(x[[1]]$content, x[[2]]$content))
})
synchronise(afun())
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.