What version of async are you using?
Which environment did the issue occur in (Node version/browser version)
What did you do? Please include a minimal reproducable case illustrating issue.
Maybe I'm missing something but I thought that priorityQueue and queue have same behaviour
but if I run the following code, the output is 1
A little late, but that's true. priorityQueue doesn't furnish all the promise style features shipped with v3.0.0. The push method cannot handle promise style, even if the worker can be an async function.
Moreover, The pushAsync method from v3.1.0 is not implemented at all (technically it is, but the priorityQueue code doesn't overload it to fit with the attended method signature that add a priority parameter)
In short: for the moment, only the callback style of priorityQueue is supported, not the promise one.