Two modes are available:

Graceful (force = FALSE, default): creates a per-worker sentinel file. Each worker checks for this file between jobs and exits cleanly once its current job finishes. Remaining PENDING jobs stay in the queue and are picked up automatically when experimentFuture is called again with the same queue_path.

Immediate (force = TRUE): sends SIGTERM to each live worker, causing the process to exit as soon as possible. Because callr workers run non-interactively, the process typically exits before R's interrupt handler has a chance to update the queue. Any jobs that were RUNNING at the time of the kill will remain as RUNNING in the queue until the next reclaim pass. Call tmuxRefreshQueueStatus(ef$queue_path) afterwards to reset stale RUNNING entries to INTERRUPTED, or use the GS backend which reclaims dead workers automatically before each new claim.

killExperimentFuture(ef, force = FALSE)

Arguments

ef

An "experimentFuture" object returned by experimentFuture.

force

If FALSE (default), signal workers via stop files so they exit after their current job completes. If TRUE, send SIGINT to each live worker for an immediate but clean stop.

Value

ef, invisibly.