Code Monkey home page Code Monkey logo

Comments (4)

GrahamBorland avatar GrahamBorland commented on May 24, 2024 1

If the cache behaviour is intentional, then I think it doesn't match the documentation:

If the transformer receives a next value while the previous value has not been delivered, the previous value will be dropped.

You are right about the deliverLatestToView variant. There were multiple Observables involved - sorry for the noise. :)

from thirtyinch.

GrahamBorland avatar GrahamBorland commented on May 24, 2024

There is similar strange behaviour with deliverLatestToView (the variant without the caching).

Again, this delivers all of the items which should have been dropped while the view was detached, but it delivers them in a different order. Is this a threading bug?

11-02 13:53:57.080 D: Emitting 21ea0e8
11-02 13:53:57.086 D: Emitting 207a5a6
11-02 13:53:57.956 D: Emitting 1b0e394
11-02 13:53:57.973 D: Emitting 9f87632
11-02 13:53:58.746 D: Emitting 182a500
11-02 13:53:58.759 D: Emitting 3b3c37e
11-02 13:54:06.459 I: Delivering 21ea0e8
11-02 13:54:06.460 I: Delivering 1b0e394
11-02 13:54:06.461 I: Delivering 182a500
11-02 13:54:06.462 I: Delivering 207a5a6
11-02 13:54:06.463 I: Delivering 3b3c37e

from thirtyinch.

passsy avatar passsy commented on May 24, 2024

The deliverLatestCacheToView behavior is correct. All items, including the already delivered ones will be emitted again. Sending all items since the view was detached could be another operator. I'm waiting for a PR from you 😉

Can you post the code for your deliverLatestToView example? These must be multiple Observables because deliverLatestToView emits only the latest item. Neither the Observables nor the operators know each other. The order between emissions of different Observables cannot be guaranteed.

from thirtyinch.

passsy avatar passsy commented on May 24, 2024
  • update documentation

from thirtyinch.

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.