On Mon, 8 Dec 2003, Mladen Turk wrote: > Can someone review this patch and eventually respond if there are > any chances to get this patch committed to apr-util. > If not we'll make something different then.
I think it would have to be called apr_reslist_timeout_set() rather than apr_reslist_set_timeout(), but in general I'm not opposed. In this block: + if (reslist->timeout) { + if (apr_thread_cond_timedwait(reslist->avail, + reslist->listlock, reslist->timeout) != APR_SUCCESS) + apr_thread_mutex_unlock(reslist->listlock); + return APR_EAGAIN; + } Is it really correct to return APR_EAGAIN regardless of the return value of apr_thread_cond_timedwait()? Or is that a bug caused by a lack of {}'s? This is why we tend to say that you should always use {}'s, even if the conditional block is only one line long. --Cliff