R/test_if_forked_cluster.R

Defines functions test_if_forked_cluster

test_if_forked_cluster <- function(){
  is_forked <- value(future(parallelly::isForkedChild()))
  if (is_forked) {
    cli::cli_abort(
      "parallel mcmc samplers cannot be run with a fork cluster"
    )
  }
}
greta-dev/greta documentation built on Dec. 21, 2024, 5:03 a.m.