aurelia / task-queue

A simple task queue for the browser that enables the queuing of both standard tasks and micro tasks.
MIT License
36 stars 21 forks source link

Flush during flush leads to not all tasks being executed #35

Open Alexander-Taran opened 3 years ago

Alexander-Taran commented 3 years ago

I'm submitting a bug report

Please tell us about your environment:

Current behavior: If one of the queued micro tasks calls flushMicroTaskQueue Queue enters the second flush cycle even though flushing is set to true after which length of queue is set to zero but for 1st flush call index is greater then length of queue at this point and leads to unexpected behavior

Expected/desired behavior:

Alexander-Taran commented 3 years ago

@bigopon ping

bigopon commented 3 years ago

@Alexander-Taran thanks for the ping. Will proceed with the merge and a new npm version soon.

Alexander-Taran commented 2 years ago

@bigopon ping (-: