<T extends CloseableInvoker> T register(T invoker) {
                invoker.teardown((__, ___) -> countDown());
                handedOff = true;
                return invoker;
            }
Hands off the reference to the given invoker, which will decrement the counter when closed.
container-search/src/main/java/com/yahoo/search/dispatch/Dispatcher.java