From 616ab4b7e7a72f0fcd7266fc8ede6829934acbc9 Mon Sep 17 00:00:00 2001 From: Rich FitzJohn Date: Mon, 23 Sep 2024 20:59:08 +0100 Subject: [PATCH] QA fixes --- R/runner-callr.R | 6 +++--- man/monty_runner_callr.Rd | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/R/runner-callr.R b/R/runner-callr.R index b498bc8a..edb9dc98 100644 --- a/R/runner-callr.R +++ b/R/runner-callr.R @@ -3,7 +3,7 @@ ##' worker processes on the same machine. If you have used `mcstate`, ##' this is the same as "worker" processes. Unless your chains take a ##' few seconds to run, this will be slower than running with the -##' default serial runner ([mcstate_runner_serial]), however for long +##' default serial runner ([monty_runner_serial]), however for long ##' running chains, the speedup will typically scale with workers ##' added, so long as your chains divide neatly over workers. ##' @@ -42,13 +42,13 @@ monty_runner_callr <- function(n_workers, progress = NULL) { env$status[[chain_id]] <- "running" } - ## processx::poll will poll, with a timeout, all our processes. + ## callr::poll will poll, with a timeout, all our processes. ## There's not much downside to a long poll because if they *are* ## ready then they will return instantly. However, the process ## will only be interruptable each time the timeout triggers, so ## use 1000 here (1s). step <- function(timeout = 1000) { - res <- processx::poll(env$sessions, timeout) + res <- callr::poll(env$sessions, timeout) is_done <- vcapply(res, "[[", "process") == "ready" if (any(is_done)) { for (session_id in which(is_done)) { diff --git a/man/monty_runner_callr.Rd b/man/monty_runner_callr.Rd index 7710a20e..3db9ae8a 100644 --- a/man/monty_runner_callr.Rd +++ b/man/monty_runner_callr.Rd @@ -38,7 +38,7 @@ the \code{callr} package to distribute your chains over a number of worker processes on the same machine. If you have used \code{mcstate}, this is the same as "worker" processes. Unless your chains take a few seconds to run, this will be slower than running with the -default serial runner (\link{mcstate_runner_serial}), however for long +default serial runner (\link{monty_runner_serial}), however for long running chains, the speedup will typically scale with workers added, so long as your chains divide neatly over workers. }