Skip to content

Commit

Permalink
fix #64: expand docs on requests to httd(daemon=TRUE) in same process (
Browse files Browse the repository at this point in the history
  • Loading branch information
torfason authored Mar 25, 2024
1 parent 49ee28f commit 808e03f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
10 changes: 9 additions & 1 deletion R/static.R
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,15 @@ watch_dir = function(
#' \code{options(servr.daemon = TRUE)}); if this option was not set,
#' \code{daemon = TRUE} if a command line argument \code{-d} was passed to R
#' (through \command{Rscript}), or the server is running in an interactive R
#' session.
#' session. Note, however, that even though the server does not block the
#' current R session, it is running in the same single-threaded process.
#' Therefore, if a request is made from this same session, the client and
#' server \emph{will} block each other. If this is your use case, a better
#' solution is to use a package such as \code{callr} to run a \code{servr}
#' in a separate process, e.g, \code{rx <- callr::r_bg(function()
#' servr::httd(daemon = FALSE)); do_stuff(); rx$kill()} (the
#' \code{do_stuff()} function may want to wait a couple of seconds before
#' making requests, to allow the server time to start).
#' @param interval The time interval used to check if an HTML page needs to be
#' rebuilt (by default, it is checked every second).
#' @param baseurl The base URL (the full URL will be
Expand Down
10 changes: 9 additions & 1 deletion man/server_config.Rd

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

0 comments on commit 808e03f

Please sign in to comment.