| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
- in lib/timers.js PriorityQueue.percolateDown cannot be used for rescheduling list,
because it does not work in all cases
- updated item does not have to be root of the heap when new timers are created
in runNextTicks and then percolateDown does not solve all binary heap
inconsistencies
- old behavior could cause infinite loop timers in some cases
- added PriorityQueue.updateAt and PriorityQueue.update methods
- simple implementation by remove & insert, could be improved...
- rescheduling list uses updateAt method
|
Thanks for info, I’ll check the priority queue for your test case... |
Sorry, something went wrong.
|
The fix is still not complete, PriorityQueue.percolateDown is not suitable method for restoring binary heap after removal of item. I have to implement updateAt method without removing and inserting the item, that wil be able to fix binary heap up and also down... It will be used in updateAt and also removeAt methods... |
Sorry, something went wrong.
|
@mareksrom sorry, I didn't see your PR earlier but I opened the correct version at #24322 which rebalances both up & down the heap. Would appreciate your review if you've got a moment. |
Sorry, something went wrong.
|
Superseded by the now merged #24322 @mareksrom Thanks for making this anyway! |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
in lib/timers.js PriorityQueue.percolateDown cannot be used for rescheduling list,
because it does not work in all cases
in runNextTicks and then percolateDown does not solve all binary heap
inconsistencies
added PriorityQueue.updateAt and PriorityQueue.update methods
Checklist