On 04/04/2018 07:43 PM, yla...@apache.org wrote:
> Author: ylavic
> Date: Wed Apr  4 17:43:46 2018
> New Revision: 1828369
> 
> URL: http://svn.apache.org/viewvc?rev=1828369&view=rev
> Log:
> reslist: follow up to r1828289: adjust maintenance top too.
> 
> Also, clarify in doxygen when apr_reslist_fifo_set() should be called.
> 
> 
> Modified:
>     apr/apr/trunk/include/apr_reslist.h
>     apr/apr/trunk/util-misc/apr_reslist.c
> 
> Modified: apr/apr/trunk/include/apr_reslist.h
> URL: 
> http://svn.apache.org/viewvc/apr/apr/trunk/include/apr_reslist.h?rev=1828369&r1=1828368&r2=1828369&view=diff
> ==============================================================================
> --- apr/apr/trunk/include/apr_reslist.h (original)
> +++ apr/apr/trunk/include/apr_reslist.h Wed Apr  4 17:43:46 2018
> @@ -134,11 +134,17 @@ APR_DECLARE(apr_status_t) apr_reslist_re
>   */
>  APR_DECLARE(void) apr_reslist_timeout_set(apr_reslist_t *reslist,
>                                            apr_interval_time_t timeout);
> +
>  /**
>   * Set whether the reslist reuses resources as FIFO (First In First Out) or
>   * LIFO (Last In First Out).
>   * @param reslist The resource list.
>   * @param fifo Set as FIFO (non zero) or LIFO (zero).
> + * @remark This function should be called before any resource is in the
> + * the reslist, otherwise maintenance optimizations based on the expiration
> + * time relative to the order of insertion (i.e. position in the list) won't
> + * work as expected.
> + *

I don't think that a remark is strong enough here. I would like to see this 
parameter either added to a new
apr_reslist_create_ex or if we want to stick with apr_reslist_fifo_set it 
should return an error if elements
are already in the reslist.

Regards

RĂ¼diger


Reply via email to