Skip to contents

Sends docker stop (graceful SIGTERM, the container's trap exits cleanly) then docker rm -f (idempotent belt-and-suspenders) for every container in the pool. Safe to call multiple times.

Usage

landis_pool_stop(pool, timeout_sec = 10)

Arguments

pool

A landis_pool object from landis_pool_start().

timeout_sec

Numeric. Graceful-stop timeout passed to docker stop. Default 10.

Value

The pool (invisibly), with stopped_at added.

Details

Typical use is via on.exit(landis_pool_stop(pool), add = TRUE) so the pool is cleaned up even when the calling DEoptim driver errors out.