From ba940c04906d92ee239ac7b83fededf4f250d567 Mon Sep 17 00:00:00 2001 From: shikokuchuo <53399081+shikokuchuo@users.noreply.github.com> Date: Fri, 22 Sep 2023 13:24:56 +0100 Subject: [PATCH] move back to public interface --- DESCRIPTION | 4 ++-- NEWS.md | 4 ++-- R/mirai-package.R | 2 +- R/mirai.R | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 35560380c..52dd032ce 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: mirai Type: Package Title: Minimalist Async Evaluation Framework for R -Version: 0.10.0.9008 +Version: 0.10.0.9009 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.9008) + nanonext (>= 0.10.0.9009) RoxygenNote: 7.2.3 diff --git a/NEWS.md b/NEWS.md index 0bf354771..42d952bd5 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,9 +1,9 @@ -# mirai 0.10.0.9008 (development) +# mirai 0.10.0.9009 (development) * `daemon()` argument 'exitlinger' retired as daemons now synchronise with the host/dispatcher and exit as soon as possible. * 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.9008]. +* Requires nanonext >= [0.10.0.9009]. # mirai 0.10.0 diff --git a/R/mirai-package.R b/R/mirai-package.R index 7a1d2bc11..b4202f889 100644 --- a/R/mirai-package.R +++ b/R/mirai-package.R @@ -100,5 +100,5 @@ NULL ), hash = TRUE ) -.seven <- as.raw(7L) +.next_format_identifier <- as.raw(7L) .timelimit <- 5000L diff --git a/R/mirai.R b/R/mirai.R index b6b1c92ae..a5db4888a 100644 --- a/R/mirai.R +++ b/R/mirai.R @@ -120,7 +120,7 @@ daemon <- function(url, asyncdial = FALSE, maxtasks = Inf, idletime = Inf, count <- count + 1L (count >= maxtasks || count > timerstart && mclock() - start >= walltime) && { - send(ctx, data = data, mode = 0L) + send(ctx, data = data, mode = 3L) data <- recv_aio_signal(sock, cv = cv, mode = 8L) wait(cv) break @@ -357,9 +357,9 @@ dispatcher <- function(host, url = NULL, n = NULL, asyncdial = FALSE, if (is.object(req)) req <- serialize(req, NULL) send(queue[[i]][["ctx"]], data = req, mode = 2L) q <- queue[[i]][["daemon"]] - if (req[1L] == .seven) { + if (req[1L] == .next_format_identifier) { ctx <- .context(servers[[q]]) - send_aio(ctx, data = .seven, mode = 2L) + send_aio(ctx, data = .next_format_identifier, mode = 2L) reap(ctx) } else { serverfree[q] <- TRUE