From a81a3784e0b69ac8f5406da5cb815301bace23ff Mon Sep 17 00:00:00 2001 From: shikokuchuo <53399081+shikokuchuo@users.noreply.github.com> Date: Mon, 14 Aug 2023 19:57:45 +0100 Subject: [PATCH] removes server() alias --- NAMESPACE | 1 - NEWS.md | 3 ++- R/mirai.R | 14 ++------------ man/daemon.Rd | 6 ------ 4 files changed, 4 insertions(+), 20 deletions(-) diff --git a/NAMESPACE b/NAMESPACE index 02a70c01c..b8bd14c93 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -20,7 +20,6 @@ export(launch_local) export(launch_remote) export(mirai) export(saisei) -export(server) export(status) export(stop_mirai) export(unresolved) diff --git a/NEWS.md b/NEWS.md index 52aa80634..0d09506b2 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,12 +1,13 @@ # mirai 0.9.1.9005 (development) +* Previously deprecated function `server()` is removed in favour of `daemon()`. * Dispatcher enhancements and fixes: + Straight pass through without serialization/unserialization allows higher performance and lower memory utilisation. + Fixes edge cases of `status()` occasionally failing to communicate with dispatcher. + Fixes edge cases of ending a session with unresolved mirai resulting in a crash rather than a clean exit. * Tweaks to `saisei()`: + specifying argument 'force' as TRUE now immediately regenerates the socket and returns any ongoing mirai as an 'errorValue'. This allows tasks that consistently hang or crash to be cancelled rather than repeated when a new daemon connects. - + argument 'i' is now required and no longer default to 1L. + + argument 'i' is now required and no longer defaults to 1L. * Tweaks to `status()`: + The daemons status matrix adds a column 'i' for ease of use with functions such as `saisei()` or `launch_local()`. + The 'instance' column is now always cumulative - regenerating a URL with `saisei()` no longer resets the counter but instead turns it negative until a new daemon connects. diff --git a/R/mirai.R b/R/mirai.R index 4055f1ecc..6d648bd9f 100644 --- a/R/mirai.R +++ b/R/mirai.R @@ -72,12 +72,6 @@ #' resources may be added or removed dynamically and the host or #' dispatcher automatically distributes tasks to all available daemons. #' -#' \strong{Note:} in previous package versions, the name of this function -#' was \code{server}. The usage of \code{server} is deprecated. Although it -#' continues to function for the time being, please update any code that -#' uses \code{server}. -#' -#' @aliases server #' @export #' daemon <- function(url, asyncdial = FALSE, maxtasks = Inf, idletime = Inf, @@ -131,10 +125,6 @@ daemon <- function(url, asyncdial = FALSE, maxtasks = Inf, idletime = Inf, } -#' @export -#' -server <- daemon - #' dot Daemon #' #' Implements an ephemeral executor for the remote process. @@ -1357,13 +1347,13 @@ init_monitor <- function(sockc, envir) { } perform_cleanup <- function(cleanup, op, se) { - if (bitwAnd(cleanup, 1L)) + if (cleanup %% 2L) rm(list = names(.GlobalEnv), envir = .GlobalEnv) if (bitwAnd(cleanup, 2L)) lapply((new <- search())[!new %in% se], detach, unload = TRUE, character.only = TRUE) if (bitwAnd(cleanup, 4L)) options(op) - if (bitwAnd(cleanup, 8L)) + if (cleanup >= 8L) gc(verbose = FALSE) } diff --git a/man/daemon.Rd b/man/daemon.Rd index cd2f2f33e..07bb01991 100644 --- a/man/daemon.Rd +++ b/man/daemon.Rd @@ -2,7 +2,6 @@ % Please edit documentation in R/mirai.R \name{daemon} \alias{daemon} -\alias{server} \title{Daemon} \usage{ daemon( @@ -86,9 +85,4 @@ The network topology is such that daemons dial into the host or dispatcher, which listens at the 'url' address. In this way, network resources may be added or removed dynamically and the host or dispatcher automatically distributes tasks to all available daemons. - - \strong{Note:} in previous package versions, the name of this function - was \code{server}. The usage of \code{server} is deprecated. Although it - continues to function for the time being, please update any code that - uses \code{server}. }