Skip to content

Commit

Permalink
make use of simplified aio structure
Browse files Browse the repository at this point in the history
  • Loading branch information
shikokuchuo committed Sep 20, 2023
1 parent 30b53dc commit 13a8b6e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 11 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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
6 changes: 3 additions & 3 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion R/mirai.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 0 additions & 5 deletions tests/tests.R
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 13a8b6e

Please sign in to comment.