Skip to content

Size discrepancy between queue.workersList().length and queue.running() #1428

@dstibrany

Description

@dstibrany

What version of async are you using?
2.4.1
Which environment did the issue occur in (Node version/browser version)
Node v4.6.0
What did you expect to happen?
queue.workersList().length should be the same size as queue.running()
What was the actual result?
They sometimes are not the same length.

I'm observing a discrepancy between queue.workersList().length and queue.running(). It looks like lib/internal/queue.js line 60 may be the culprit. Shouldn't we always be splicing exactly one element here instead of potentially many elements. So replacing:

workersList.splice(index)

with

workersList.splice(index, 1)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions