Code Monkey home page Code Monkey logo

Comments (6)

jchambers avatar jchambers commented on May 25, 2024

Why does pushy not drain publicQueue when shutdown() is called?

We don't completely control the public queue, so we don't know when it might become empty. If somebody tries to shut down pushy, but continues to enqueue notifications, we might never finish shutting down. It seemed like a choice between evils, and "sending stopped sooner than expected" seems slightly better than "pushy never shut down."

Is there a plan to drain publicQueue at next iteration?

Not right now, but we're open to arguments that we should do so.

Is there a recommended way of draining publicQueue when shutdown() is called?

It hasn't really come up yet, honestly. One possibility that springs to mind is subclassing a blocking queue and adding methods to notify listeners when the queue becomes empty.

…it wasn't quite obvious to me from pushy documentation that publicQueue will NOT be drained until I wrote an integration test.

Well, that's clearly a problem regardless of whatever else we decide to do. We'll see what we can do to clear things up there.

from pushy.

TurtleShip avatar TurtleShip commented on May 25, 2024

@jchambers Thanks for your response! πŸ‘

from pushy.

jchambers avatar jchambers commented on May 25, 2024

If you don't mind, I'd like to keep this open until the docs actually get reviewed/updated (so we don't forget).

from pushy.

TurtleShip avatar TurtleShip commented on May 25, 2024

No, I don't mind at all πŸ‘

from pushy.

jchambers avatar jchambers commented on May 25, 2024

With apologies for the delay, the PushManager docs have been updated in 1711586.

from pushy.

TurtleShip avatar TurtleShip commented on May 25, 2024

Thanks! :-) πŸ‘

from pushy.

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.