Last 12 weeks · 0 commits
4 of 6 standards met
It's useful for the situation like "queue some processing like building up to 1, and do not run at the same time". naming candidates I didn't came up with good name. p-serial implementation with promise-queue implementation from scratch NOTE: this is fully written by me and publishing under public domain. usage example is only shown 2 times. vs others vs : this will run all queued promises. vs : this will run concurrently vs : no option to limit max length vs : easy for the specific case
Hey Sindre, I'm trying to make sure some 2nd priority code doesn't block the event loop to the exclusion of forward progress on customer-facing tasks. To do that I need to break up long loops to make sure they don't monopolize the event loop. Your throttling library is not quite right, because I don't want to limit operations per second, I want to guarantee idle time. There's no number that would be accurate for all cps or all tasks. What I really want to do is throttle the work to perhaps 50ms out of every 200 ms. What are my options for making this an async task?
Repository: sindresorhus/promise-fun. Description: Promise packages, patterns, chat, and tutorials Stars: 5149, Forks: 137. License: CC0-1.0. Topics: async, async-await, async-functions, awesome, awesome-list, concurrency, iteration, javascript, list, nodejs, polyfill, ponyfill, promise, promise-library, promise-modules, promise-patterns, promise-queue, promises, resources, unicorns. Open PRs: 0, open issues: 0. Last activity: 2y ago. Community health: 71%. Top contributors: sindresorhus, Richienb, kevva, benjamingr, tychenjiajun, TehShrike, yakov116.