Re: java.util.concurrent.Flow with opposite direction of item flow

Alexei Kaigorodov via Concurrency-interest <[email protected]>
Newsgroups gmane.comp.java.jsr.166-concurrency
Message-ID <[email protected]>
/   Publisher<T> p1 = ...
    Publisher<T> p2 = ...  
    Publisher<T> p3 = ...    
...

If the generators can appear dynamically, you can submit them to a Processor
and identity-flatMap the sequence:

    Processor<Publisher&lt;T>> processor = PublishProcessor.create();

    Flowable<T> mergedDynamic = processor.flatMap(p -> p);

    processor.onNext(p1);
    processor.onNext(p2);
  /
1. Does it mean that the output of Publishers p1 and p2 appear on the output
of processor in parallel, without delays?
2. Is there an opposite operation to  /processor.onNext(p1)/, when p1 wants
to stop sending data to the processor?




--
Sent from: http://jsr166-concurrency.10961.n7.nabble.com/
_______________________________________________
Concurrency-interest mailing list
[email protected]
http://cs.oswego.edu/mailman/listinfo/concurrency-interest
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.