Thread (53 messages) 53 messages, 4 authors, 2024-09-05

Re: [PATCH 15/22] negotiator/skipping: fix leaking commit entries

From: Calvin Wan <hidden>
Date: 2024-08-29 17:29:35

On Thu, Aug 29, 2024 at 1:41 AM Patrick Steinhardt [off-list ref] wrote:
Yeah, that's mostly the reason. We have e.g. `string_list_clear_func()`
that works around this issue by making the caller provide the cleanup
function, and we could use the same pattern here. But it seems as if
most of the callers of `clear_prio_queue()` don't need this because they
already drain the queue during normal operations anyway.

With patch 14 you probably refer to `clear_shallow_info()`? We're not
using a priority queue there, so it is not quite related to the prio
queue we have here. So I'm inclined to leave this as-is, and if we ever
see that we have more callsites that want to clean up the prio queue and
its contents we can introduce `prio_queue_clear_func()`. Does that work
for you?
Yes it does! Thanks for the clarification
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help