void (@Nullable Runnable task) { try { if (!myDisposed && task != null) { try (AccessToken ignored = ClientId.withClientId(myClientId)) { if (myChildContext != null) { try (AccessToken ignored2 = ThreadContext.installThreadContext(myChildContext.getContext(), true)) { QueueProcessor.runSafely(() -> myChildContext.runAsCoroutine(task)); } } else { QueueProcessor.runSafely(task); } } } } finally { // remove from the list after execution to be able for {@link #waitForAllExecuted(long, TimeUnit)} to wait for completion synchronized (LOCK) { myRequests.remove(this); myFuture = null; } } }