Skip to contents

Spawns, inspects, or shuts down persistent background worker processes for high-throughput batch detection, segmentation, and image processing.

If pliman_daemons(n) is called by the user, workers remain persistent and warm across multiple function calls throughout your R session (eliminating initialization overhead). If functions with parallel = TRUE are called without prior pliman_daemons(), temporary workers are started and automatically closed when the function finishes, preventing unnecessary memory consumption.

Usage

pliman_daemons(workers = NULL)

Arguments

workers

Number of workers to spawn. If 0, shuts down active daemons. If NULL (default), prints the current status of active daemons.

Value

The number of active daemons (invisibly).

Examples

if (FALSE) { # \dontrun{
# Check active workers
pliman_daemons()

# Start and pre-warm 7 workers once for heavy batch workflows
pliman_daemons(7)

# Subsequent batch detections start instantly with 0s overhead
image_detect_batch(data = ".", pattern = "\\.jpg$", model = "flax_capsule_det", parallel = TRUE)

# Shut down daemons when finished to free system memory
pliman_daemons(0)
} # }