Skip to content

Commit

Permalink
use .unresolved()
Browse files Browse the repository at this point in the history
  • Loading branch information
shikokuchuo committed Oct 7, 2024
1 parent e35b4fb commit 00f9d10
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/promises.R
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ as.promise.mirai <- function(x) {

if (is.null(promise)) {

promise <- if (unresolved(x)) {
promise <- if (.unresolved(x)) {
promises::promise(
function(resolve, reject) .keep(x, environment())
)$then(
Expand All @@ -78,7 +78,7 @@ as.promise.mirai <- function(x) {
value
)
} else {
value <- .subset2(x, "value")
value <- collect_aio(x)
promises::promise(
function(resolve, reject)
if (is_error_value(value) && !is_mirai_interrupt(value))
Expand Down

0 comments on commit 00f9d10

Please sign in to comment.