Skip to content

Commit

Permalink
preserve reverse cancellation order
Browse files Browse the repository at this point in the history
Signed-off-by: Charlie Gao <[email protected]>
  • Loading branch information
shikokuchuo authored Dec 13, 2024
1 parent 1d7c723 commit d3fe06d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion R/mirai.R
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,13 @@ collect_mirai <- collect_aio
#' @export
#'
stop_mirai <- function(x) {
is.list(x) && return(as.logical(lapply(x, stop_mirai)))
is.list(x) && {
xlen <- length(x)
vec <- logical(xlen)
for (i in seq_len(xlen))
vec[[i]] <- stop_mirai(x[[xlen - i + 1L]])
return(vec)
}
.compute <- attr(x, "profile")
envir <- if (is.character(.compute)) ..[[.compute]]
stop_aio(x)
Expand Down

0 comments on commit d3fe06d

Please sign in to comment.