update priorityQueue functionality to match queue [fixes #1725]#1790
update priorityQueue functionality to match queue [fixes #1725]#1790hargasinski merged 1 commit intomasterfrom
Conversation
|
The failed tests don't seem to be related to this PR, tests for other functions are timing out. |
aearly
left a comment
There was a problem hiding this comment.
Thanks for this, this has been a missing feature for a while. Just a small question.
| expect(q.length()).to.equal(0); | ||
| call_order.push('callback ' + 3); | ||
| }); | ||
| q.push(4, 2.9, (err, arg) => { |
There was a problem hiding this comment.
The expected lengths change, due to pushing this array, correct?
There was a problem hiding this comment.
Yes sir, we don't test pushing an array in any of the other priorityQueue tests, so I thought it would be useful to add.
|
@aearly is this good to go? |
|
I'm running into an issue with the build, looks like somewhere along the way one of |
|
@aearly published |
This PR updates the
priorityQueuebehaviour to match thequeueimplementation:priorityQueue(see PriorityQueue push doesn't wait for result #1725).pushAsyncand removesunshiftAsync.drainwasn't being called when an empty task was pushed.queuelogic inqueue. The one issue with this is it now iterates over thetaskstwice, once inpriorityQueueand once inqueue. Let me know if there's a better way you can think of.I also added a few tests from
queuetopriorityQueueto make sure the functionality matches.