From 13a8b6e7b361415d8bf878d03169b1b9ed8607e6 Mon Sep 17 00:00:00 2001 From: shikokuchuo <53399081+shikokuchuo@users.noreply.github.com> Date: Wed, 20 Sep 2023 15:15:04 +0100 Subject: [PATCH] make use of simplified aio structure --- DESCRIPTION | 4 ++-- NEWS.md | 6 +++--- R/mirai.R | 2 +- tests/tests.R | 5 ----- 4 files changed, 6 insertions(+), 11 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 63dd4f6c8..d3c904aa7 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: mirai Type: Package Title: Minimalist Async Evaluation Framework for R -Version: 0.10.0.9002 +Version: 0.10.0.9003 Description: Lightweight parallel code execution and distributed computing. Designed for simplicity, a 'mirai' evaluates an R expression asynchronously, on local or network resources, resolving automatically upon completion. @@ -23,5 +23,5 @@ Encoding: UTF-8 Depends: R (>= 3.5) Imports: - nanonext (>= 0.10.0.9006) + nanonext (>= 0.10.0.9007) RoxygenNote: 7.2.3 diff --git a/NEWS.md b/NEWS.md index 4b826ea23..107eac3f8 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,9 +1,9 @@ -# mirai 0.10.0.9002 (development) +# mirai 0.10.0.9003 (development) * Ephemeral daemons now synchronise with the host process and exit as soon as the completed mirai task is received, without an 'exitlinger' period. -* Optimises scheduling at dispatcher - tasks are no longer assigned to a daemon if it is exiting due to specified time/task-outs. +* Optimises scheduling at dispatcher: tasks are no longer assigned to a daemon if it is exiting due to specified time/task-outs. * Deprecated use of alias `server()` for `daemon()` is retired. -* Requires nanonext >= [0.10.0.9005]. +* Requires nanonext >= [0.10.0.9007]. # mirai 0.10.0 diff --git a/R/mirai.R b/R/mirai.R index 0bbf26823..549203c36 100644 --- a/R/mirai.R +++ b/R/mirai.R @@ -360,7 +360,7 @@ dispatcher <- function(host, url = NULL, n = NULL, asyncdial = FALSE, req <- queue[[i]][["res"]] send(queue[[i]][["ctx"]], data = req, mode = 2L) q <- queue[[i]][["daemon"]] - serverfree[q] <- parent.env(req)[["result"]][1L] != .seven + serverfree[q] <- req[["value"]][1L] != .seven complete[q] <- complete[q] + 1L ctx <- .context(sock) req <- recv_aio_signal(ctx, cv = cv, mode = 8L) diff --git a/tests/tests.R b/tests/tests.R index 4b0f376b2..892353a04 100644 --- a/tests/tests.R +++ b/tests/tests.R @@ -150,11 +150,6 @@ if (Sys.getenv("NOT_CRAN") == "true" && .Platform[["OS.type"]] != "windows") { nanotestn(launch_local(1L)) Sys.sleep(1L) nanotest(grepl("CERTIFICATE", launch_remote(1L), fixed = TRUE)) - nanotest(is.character(saisei(i = 1L, force = TRUE))) - file <- tempfile() - on.exit(unlink(file)) - cat(nextget("tls"), file = file) - nanotestn(launch_local(1L, tls = file)) nanotesterr(launch_local(0:1), "out of bounds") nanotesterr(launch_remote(1:2), "out of bounds") nanotestz(daemons(0L))