-
Notifications
You must be signed in to change notification settings - Fork 844
TS-4537 Add erase method to PriorityQueue
#708
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Ping @masaori335 |
|
Linux build successful! See https://ci.trafficserver.apache.org/job/Github-Linux/158/ for details. |
|
FreeBSD build successful! See https://ci.trafficserver.apache.org/job/Github-FreeBSD/263/ for details. |
lib/ts/PriorityQueue.h
Outdated
| } | ||
|
|
||
| _v.remove_index(entry->index); | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO, we can avoid rewriting all of the indexes because this is Binary Heap.
How about this like what we're doing in PriorityQueue<T, Comp>::pop() ?
_v[entry->index] = _v[_v.length() - 1];
_v.pop();
_bubble_down(entry->index);
|
Looks good. |
|
Linux build successful! See https://ci.trafficserver.apache.org/job/Github-Linux/175/ for details. |
|
FreeBSD build successful! See https://ci.trafficserver.apache.org/job/Github-FreeBSD/283/ for details. |
This closes apache#708 (cherry picked from commit 78850a8) Conflicts: lib/ts/test_PriorityQueue.cc
* Build with quiche on el7 as well * Unlimit BoringSSL version * Fix * Update version number * Revert changes for CMakeLists * Fix indent * Fix typo * Update quiche version * Use --nobest option * Fix typo * Use setopt instead of nobest * Try not to use super old versions * Try a different order * setopt * Don't install boringssl explicitly
No description provided.