Skip to content

Commit

Permalink
nicer daemon() argument ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
shikokuchuo committed Feb 7, 2025
1 parent 6a56fd9 commit ed04963
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* Removal of mirai v1 compatibility features:
+ `saisei()` is now removed as no longer required.
+ `daemons()` dispatcher argument "thread" is removed.
+ `daemons()` dispatcher arguments "process" and "thread" are formally deprecated and will be removed in a future version.
+ `daemons()` dispatcher arguments "process" and "none" are formally deprecated and will be removed in a future version.

#### Updates

Expand Down
4 changes: 2 additions & 2 deletions R/daemons.R
Original file line number Diff line number Diff line change
Expand Up @@ -505,10 +505,10 @@ parse_tls <- function(tls)
libp <- function(lp = .libPaths()) lp[file.exists(file.path(lp, "mirai"))][1L]

wa2 <- function(url, dots, rs, tls = NULL)
shQuote(sprintf("mirai::daemon(\"%s\"%s%s,rs=c(%s),dispatcher=FALSE)", url, dots, parse_tls(tls), paste0(rs, collapse = ",")))
shQuote(sprintf("mirai::daemon(\"%s\",dispatcher=FALSE%s%s,rs=c(%s))", url, dots, parse_tls(tls), paste0(rs, collapse = ",")))

wa3 <- function(url, dots, rs, tls = NULL)
shQuote(sprintf("mirai::daemon(\"%s\"%s%s,rs=c(%s),dispatcher=TRUE)", url, dots, parse_tls(tls), paste0(rs, collapse = ",")))
shQuote(sprintf("mirai::daemon(\"%s\",dispatcher=TRUE%s%s,rs=c(%s))", url, dots, parse_tls(tls), paste0(rs, collapse = ",")))

wa4 <- function(urld, dots, rs, n)
shQuote(sprintf(".libPaths(c(\"%s\",.libPaths()));mirai::dispatcher(\"%s\",n=%d,rs=c(%s)%s)", libp(), urld, n, paste0(rs, collapse= ","), dots))
Expand Down

0 comments on commit ed04963

Please sign in to comment.