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

Dávid Karnok via Concurrency-interest <[email protected]>
Newsgroups gmane.comp.java.jsr.166-concurrency
Message-ID <CAAWwtm_+4vYCgK-Q5eY0EuwfuSPBxA3didYESKhA-xnzjqZ03w@mail.gmail.com>
Reactive Streams and JDK Flow is about non-blocking flow control so we in
RxJava avoid blocking in our constructs to a greater extent. Hence we don't
provide means to work with blocking queues directly; you have to lay the
blocking pipes across operators for yourself.

    BlockingQueue q;

    generator.doOnNext(q::put).subscribe();

    Flowable.create(emitter -> emitter.onNext(q.take())).subscribe();


I'd suggest rethinking the prerequisite of blocking constructs to solve
your original problem.

Alexei Kaigorodov via Concurrency-interest <
[email protected]> ezt írta (időpont: 2019. dec. 20., P,
7:39):

> / merge/flatMap produces a Publisher and as such, its onNext is serialized
> with respect to the sources/
> so I assume RxJava cannot provide solution for asynchronous
> Provider=>BlockingQueue communication pattern which behaves exactly as
> traditional synchronous communication.
>
>
>
> --
> Sent from: http://jsr166-concurrency.10961.n7.nabble.com/
> _______________________________________________
> Concurrency-interest mailing list
> [email protected]
> http://cs.oswego.edu/mailman/listinfo/concurrency-interest
>


-- 
Best regards,
David Karnok

_______________________________________________
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.