Skip to content

Commit

Permalink
move back to public interface
Browse files Browse the repository at this point in the history
  • Loading branch information
shikokuchuo committed Sep 22, 2023
1 parent 1f1c8cc commit ba940c0
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 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.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.
Expand All @@ -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
4 changes: 2 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion R/mirai-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -100,5 +100,5 @@ NULL
),
hash = TRUE
)
.seven <- as.raw(7L)
.next_format_identifier <- as.raw(7L)
.timelimit <- 5000L
6 changes: 3 additions & 3 deletions R/mirai.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit ba940c0

Please sign in to comment.