Пример #1
0
 public StreamEmitter<T> createEmitter() {
   synchronized (generator) {
     return StreamEmitter.safeCast(generator.get());
   }
 }
Пример #2
0
 public <R> Publisher<R> transform(final Operator<? super T, ? extends R> operator) {
   return Publishers.create(
       () -> {
         return StreamEmitter.safeCast(operator.apply(createEmitter()));
       });
 }