Giter Club home page Giter Club logo

Comments (8)

gentrio avatar gentrio commented on May 29, 2024

WX20230802-204502@2x

from rxlife.

liujingxing avatar liujingxing commented on May 29, 2024

看起来确实是多余的,应该是手误,容我再回忆回忆

from rxlife.

gentrio avatar gentrio commented on May 29, 2024

还有一个点想跟老哥讨论一下,我看RxHttp和RxLife封装的Observer都对onNext做了try catch,我onNext里处理逻辑抛出异常,同样会走onError处理逻辑,这样的话相当于onNext和onError都触发了,两者并不是互斥的,就是这么设计的吗?

from rxlife.

liujingxing avatar liujingxing commented on May 29, 2024

是的,RxJava就是这么设计的

from rxlife.

gentrio avatar gentrio commented on May 29, 2024

我刚有看Rxjava的设计,当传入onNext consumer和onError consumer 异常是会被捕获因为封装了一层observer,前提未进行线程切换,但如果使用自定义Observe异常是捕获不住的。

from rxlife.

liujingxing avatar liujingxing commented on May 29, 2024

前提未进行线程切换?这句话我没看懂

from rxlife.

gentrio avatar gentrio commented on May 29, 2024

线程切换这点理解有误,主要还是看Observer的处理机制

from rxlife.

liujingxing avatar liujingxing commented on May 29, 2024

是的,onError/onComplete才是互斥的

from rxlife.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.