On Fri, Apr 13, 2018 at 7:30 PM, William A Rowe Jr <wr...@rowe-clan.net> wrote:
> I'm still unclear why you believe we need APR to purge the elts when the
> user chooses to flip the fifo/lifo switch. That seems very wrong to me, the
> consumer can do so if that is what they desire.

To be clear (with myself):

/* What we have */
APU_DECLARE(apr_status_t) apr_reslist_acquire(apr_reslist_t *reslist,
                                              void **resource);
/* What we want */
#define apr_reslist_acquire_lifo apr_reslist_acquire
APU_DECLARE(apr_status_t) apr_reslist_acquire_fifo(apr_reslist_t *reslist,
                                                   void **resource);

And all we have to do is implement the latter.
Of course you are right, how much simpler! No fifo setter (or
_create_ex) for the whole reslist lifetime, no headache on what to do
when it shouldn't be called, no nothing, and much more user friendly.

When the user wants the head of the list, we return it, likewise for
the tail, with the exact same expiry checks on the oldest resources
(we know where they are internally) or min ones to create. This is
just about which end we finally return...

I've been ridiculously long to get your point, but I do now I think, right?
Thanks Bill, will revert and restart from there!

Reply via email to