void (@NotNull Runnable flushRunnable, long nowNano) { if (myPendingChunks.isEmpty()) { flushRunnable.run(); return; } Chunk first = myPendingChunks.get(0); // flush after the last pending chunk myPendingChunks.add(new Chunk(null, first.myBaseOutputType, nowNano, myLastFlushedChunkCreatedNanoTime, flushRunnable)); }