On 10/01/2009 04:06 PM, Jim Jagielski wrote:
On Oct 1, 2009, at 3:44 AM, jean-frederic clere wrote:
On 09/30/2009 06:18 PM, Jim Jagielski wrote:
On Sep 29, 2009, at 5:23 AM, jean-frederic clere wrote:
Hi,
I would like to change the doall / ap_slotmem_callback_fn_t logic.
For the moment we can't stop the doall loop, but it could be
interesting to do so (for example while search for a value in the
slotmems).
My idea is to return APR_SUCCESS when done and APR_INCOMPLETE if we
want to go on doing the loop.
How would it be re-entrant?
hmmm... Well the caller would have to solve that problem, it is a loop
calling a callback, no?
I mean if doall returns APR_INCOMPLETE, it means that it stopped at
some point within the loop.
Yes
But how would the caller know where and how would the caller
re-start the loop but say "start here instead"?
That would be the problem of the caller. If the callback stops the doall
loop it should have the logic to skip the slots it already processed no?
Or do you mean that doall would always return APR_SUCCESS but
the internal loop of doall could terminate somewhere within
the loop?
That was my first idea... If we choose to go that way it is easy :-)
Cheers
Jean-Frederic