Skip to content

Commit

Permalink
removes server() alias
Browse files Browse the repository at this point in the history
  • Loading branch information
shikokuchuo committed Aug 14, 2023
1 parent 97d6dd6 commit a81a378
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 20 deletions.
1 change: 0 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ export(launch_local)
export(launch_remote)
export(mirai)
export(saisei)
export(server)
export(status)
export(stop_mirai)
export(unresolved)
Expand Down
3 changes: 2 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
14 changes: 2 additions & 12 deletions R/mirai.R
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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)
}

Expand Down
6 changes: 0 additions & 6 deletions man/daemon.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a81a378

Please sign in to comment.