Last 12 weeks · 2 commits
4 of 6 standards met
Thanks for the great lib. Not sure if this would be considered an issue but clearing the queue with any open tasks causes the library to have dangling promises, which could also prevent the event loop from clearing: Running this ends with the error: If this is considered an issue, happy to send in a PR for this (with maybe an optional flag to not break existing users)
Repository: sindresorhus/p-queue. Description: Promise queue with concurrency control Stars: 4142, Forks: 198. Primary language: TypeScript. Languages: TypeScript (100%). License: MIT. Topics: async-functions, async-queue, node-module, npm-package, promise, promise-queue, queue, queue-data-stucture. Latest release: v9.1.0 (1mo ago). Open PRs: 3, open issues: 2. Last activity: 5d ago. Community health: 85%. Top contributors: sindresorhus, Richienb, floatdrop, Rafael09ED, onury, ltetzlaff, edorivai, dobesv, BendingBender, bobjflong and others.
TypeScript
Hi, Currently when a task is added with a timeout, the event is never sent while the task resolve with , I think that if the task resolve without an error it should emit the event. Here is a simple reproduction: Which output: I understand that resolving with could be used to check that one task timed out, but having the event on the queue itself allow some global logic to all tasks which is what I need, maybe is not the best event to emit and a new event should be added ?