Skip to content

Commit

Permalink
simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
shikokuchuo committed Dec 30, 2024
1 parent 8f1ee3f commit 0897961
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions R/dispatcher.R
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ dispatcher <- function(host, url = NULL, n = NULL, ..., tls = NULL, pass = NULL,
listen(psock, url = url, tls = tls, error = TRUE)

msgid <- 0L
loop <- FALSE
status <- NULL
inq <- outq <- list()
envir <- new.env(hash = FALSE)
Expand Down Expand Up @@ -155,14 +154,12 @@ dispatcher <- function(host, url = NULL, n = NULL, ..., tls = NULL, pass = NULL,
if (value[1L] == 0L) {
id <- readBin(value, "integer", n = 2L)[2L]
if (id == 0L) {
loop <- TRUE
status <- c(
length(outq),
length(inq),
sum(as.logical(unlist(lapply(outq, .subset2, "msgid"), use.names = FALSE)))
)
} else if (id > 0) {
loop <- TRUE
status <- FALSE
for (i in seq_along(outq))
if (outq[[i]][["msgid"]] == id) {
Expand Down Expand Up @@ -192,10 +189,6 @@ dispatcher <- function(host, url = NULL, n = NULL, ..., tls = NULL, pass = NULL,
}
ctx <- .context(sock)
req <- recv_aio(ctx, mode = 8L, cv = cv)
loop && {
loop <- FALSE
next
}

} else if (!unresolved(res)) {
value <- .subset2(res, "value")
Expand Down

0 comments on commit 0897961

Please sign in to comment.