RxJava vs Java 8 Parallelism Stream

后端 未结 3 567
春和景丽
春和景丽 2021-02-01 04:33

What are all the similarities and diferences between them, It looks like Java Parallel Stream has some of the element available in RXJava, is that right?

3条回答
  •  醉酒成梦
    2021-02-01 04:53

    Rx is an API for creating and processing observable sequences. The Streams API is for processing iterable sequences. Rx sequences are push-based; you are notified when an element is available. A Stream is pull-based; it "asks" for items to process. They may appear similar because they both support similar operators/transforms, but the mechanics are essentially opposites of each other.

提交回复
热议问题