docs: public CompletableFuture<E> nextEvent() {
      E event = events.poll();
      if (event != null) {
        return CompletableFuture.completedFuture(event);
      } else {
        CompletableFuture<E> future = new CompletableFuture<>();
        futures.add(future);
        return future;
      }
    }