Re: [PATCH] use commit_stack instead of prio_queue in LIFO mode
- From
Patrick Steinhardt <ps@pks.im>
- Date
- Mar 19, 2026, 07:19 UTC
- Message-ID
- <abujjg-8hwPPlkMU@pks.im>
- In-Reply-To
- <05fc946f-6670-46e9-a058-231ee464029d@web.de>
On Tue, Mar 17, 2026 at 10:40:07PM +0100, René Scharfe wrote:
Show 5 quoted lines
> A prio_queue with a NULL compare function acts as a stack -- the last > element in is the first one out (LIFO). Use an actual commit_stack > instead where possible, as it documents the behavior better, provides > type safety and saves some memory because prio_queue stores an > additional tie-breaking counter per element.
Right. I doubt that the memory improvement will really make much of a difference, but I agree that using a commit stack makes the intent clearer.
The changes all look as expected to me. Thanks!
Patrick