Skip to content

PriorityQueue push doesn't wait for result #1725

Closed
@perusopersonale

Description

@perusopersonale

What version of async are you using?
^3.2.0
Which environment did the issue occur in (Node version/browser version)
Node: >=12
npm: 6.13.4

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

 const queue = async.queue( async (task) =>{
   return Promise.resolve(1)
 })          
const res = await queue.push({})
console.log(res)

instead if I run the following code the output is undefined

const queue = async.priorityQueue( async (task) =>{
  return Promise.resolve(1)
})
const res = await queue.push({},1)
console.log(res)

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions