public StreamEmitter<T> createEmitter() { synchronized (generator) { return StreamEmitter.safeCast(generator.get()); } }
public <R> Publisher<R> transform(final Operator<? super T, ? extends R> operator) { return Publishers.create( () -> { return StreamEmitter.safeCast(operator.apply(createEmitter())); }); }