Closed animir closed 3 years ago
@sindresorhus p-queue or another package could
Sure. I'm just not interested in maintaining a package with that kind of complexity.
@sindresorhus It may be much easier than you think. The reason I raised this topic is that you have already got a lot of experience around concurrent promises and limits. Also, I am maintainer of a rate-limiter-flexible package. Essentially, it provides transparent API to make atomic increments with different storages. I presume, p-queue
already counts events in memory, so it could just change the way counter incremented/decremented depending on events.
It's not just about how easy it is to add. I have to maintain and do support for it. That being said, if you can find a way to make a hook in p-queue
so users can use rate-limiter-flexible
with p-queue
, I'm happy to have that added.
No, nothing on npm works across processes unless explicitly noted.