On Thu, Aug 29, 2024 at 1:41 AM Patrick Steinhardt <ps@xxxxxx> 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