From 12ce2e5ad68480f802ee877a70f0982ba5ade417 Mon Sep 17 00:00:00 2001 From: Charlie Gao <53399081+shikokuchuo@users.noreply.github.com> Date: Thu, 12 Dec 2024 08:23:10 +0900 Subject: [PATCH] Discard cancellation response, skip in queue, pass on signal Signed-off-by: Charlie Gao <53399081+shikokuchuo@users.noreply.github.com> --- R/dispatcher.R | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/R/dispatcher.R b/R/dispatcher.R index 61317d6f..ef8d7759 100644 --- a/R/dispatcher.R +++ b/R/dispatcher.R @@ -201,6 +201,11 @@ dispatcher <- function(host, url = NULL, n = NULL, ..., tls = NULL, pass = NULL, value <- .subset2(res, "value") id <- as.character(.subset2(res, "aio")) res <- recv_aio(psock, mode = 8L, cv = cv) + if (outq[[id]][["msgid"]] < 0) { + outq[[id]][["msgid"]] <- 0L + nanonext::cv_signal(cv) + next + } send(outq[[id]][["ctx"]], value, mode = 2L, block = TRUE) outq[[id]][["msgid"]] <- 0L }