
Manage Persistent Parallel Workers for High-Speed Processing
Source:R/utils_dl_batch.R
pliman_daemons.RdSpawns, 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.
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)
} # }