Coder Social home page Coder Social logo

Comments (2)

getify avatar getify commented on September 14, 2024

There's one minor but irreconcilable fact which makes Queue not so "general purpose" itself: the cycle = void 0 part.

That part is critical to run at the end of the scheduling-queue drain, but pulling it out of Queue() means I'd have to create another closure or other binding to make it happen, which is a killer for performance.

Now, that having been said, the "scheduling queue" as its own set of functionality (not a general purpose queue but a managed-cycle special-purpose queue) is possibly something that could be general purpose.

I have this gist which does just that. I don't know if it's really something anyone else cares to use, but in theory they could re-use it.

With respect to actually making a separate thing of it, and then having NPO use that thing, that feels like it might be a little overkill. It would probably add a little bit of wrapper boilerplate size (like an IIFE, etc), and it might slow things down a bit, which would be very counter to the overall goal.

I'm open to suggestions here, but I lean toward: let people use the gist if they care. :)

from native-promise-only.

smikes avatar smikes commented on September 14, 2024

Seems legit.

from native-promise-only.

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.