protected final void callInOtherThread(final Callable<Void> task) {
            final TaskHandle taskHandle = addTask();
            final Runnable runnable = () -> {
                try {
                    task.call();
                } catch (Exception e) {
                    setTaskFailure(e);
                }
                removeTask(taskHandle);
            };
            try {
                executor.submit(runnable);
            } catch (RejectedExecutionException e) {
                setTaskFailure(e);
                removeTask(taskHandle);
            }
        }
Wrapper around CountDownLatch for single-occurrence events.
jdisc_core/src/main/java/com/yahoo/jdisc/test/ServerProviderConformanceTest.java