public final void executeAfterEventLoopIteration(Runnable task) {
        ObjectUtil.checkNotNull(task, "task");
        if (isShutdown()) {
            reject();
        }

        if (!tailTasks.offer(task)) {
            reject(task);
        }

        if (wakesUpForTask(task)) {
            wakeup(inEventLoop());
        }
    }
@Test
    @Timeout(value = 10000, unit = TimeUnit.MILLISECONDS)
    public void testOnEventLoopIteration() throws Exception {
        CountingRunnable onIteration = new CountingRunnable();
        loopC.executeAfterEventLoopIteration(onIteration);
        CountingRunnable noopTask = new CountingRunnable();
        loopC.submit(noopTask).sync();
        loopC.iterationEndSignal.take();
        MatcherAssert.assertThat("Unexpected invocation count for regular task.",
                                 noopTask.getInvocationCount(), is(1));
        MatcherAssert.assertThat("Unexpected invocation count for on every eventloop iteration task.",
                                 onIteration.getInvocationCount(), is(1));
    }