Skip to contents

Monitors all workers, recycling those with excessive RSS drift or that have died.

Usage

pool_health_check(pool = NULL, busy_workers = NULL)

Arguments

pool

A shard_pool object. If NULL, uses the current pool.

busy_workers

Optional integer vector of worker ids that are currently running tasks (used internally by the dispatcher to avoid recycling a worker while a result is in flight).

Value

A list with health status per worker and actions taken.

Examples

# \donttest{
p <- pool_create(2)
pool_health_check(p)
#> Pool health check at 2026-03-30 20:47:22 
#> Stats: recycles = 0 , deaths = 0 , tasks = 0 
#> All workers healthy
pool_stop(p)
# }