We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 19eee51 commit c292f4dCopy full SHA for c292f4d
1 file changed
registry/src/lib/promise-queue.ts
@@ -40,7 +40,10 @@ export class PromiseQueue {
40
41
if (this.maxQueueLength && this.queue.length >= this.maxQueueLength) {
42
// Drop oldest task to prevent memory buildup
43
- this.queue.shift()
+ const droppedTask = this.queue.shift()
44
+ if (droppedTask) {
45
+ droppedTask.reject(new Error('Task dropped: queue length exceeded'))
46
+ }
47
}
48
49
this.queue.push(task as QueuedTask<unknown>)
0 commit comments