inst/testme/test-utils,pid.R

library(parallelly)

message("*** utils,pid ...")

pid_exists <- parallelly:::pid_exists

## Test with current process
res <- pid_exists(Sys.getpid())
print(res)
stopifnot(isTRUE(res))

## Test with current process
res <- pid_exists(Sys.getpid(), debug = TRUE)
print(res)
stopifnot(isTRUE(res))

## Exceptions
res <- tryCatch(pid_exists(0L), error = identity)
stopifnot(inherits(res, "error"))

message("*** utils,pid ... DONE")

Try the parallelly package in your browser

Any scripts or data that you put into this service are public.

parallelly documentation built on Dec. 18, 2025, 5:08 p.m.