void start() {
        if (enableScheduler) {
            if (scheduler == null) this.scheduler = new ScheduledThreadPoolExecutor(
                    1,
                    runnable -> {
                        Thread thread = new Thread(runnable, "container-watchdog");
                        thread.setDaemon(true);
                        return thread;
                    });
            if (containerMontoringTask != null) containerMontoringTask.cancel(false);
            if (threadMonitoringTask != null) threadMonitoringTask.cancel(false);
            containerMontoringTask = scheduler.scheduleAtFixedRate(
                    this::monitorDeactivatedContainers,
                    CONTAINER_CHECK_PERIOD.getSeconds(), CONTAINER_CHECK_PERIOD.getSeconds(), TimeUnit.SECONDS);
        }
    }
A watchdog that monitors all deactivated {@link ActiveContainer} instances with the purpose of detecting stale containers.

@author bjorncs
jdisc_core/src/main/java/com/yahoo/jdisc/core/ContainerWatchdog.java