apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cliff Woolley <jwool...@virginia.edu>
Subject Re: REPOST: [PATCH] add timeout to apr_reslist
Date Tue, 09 Dec 2003 17:10:51 GMT
On Tue, 9 Dec 2003, Jeff Trawick wrote:

> > +        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
>
> if not returning whatever apr_thread_cond_timedwait() returned, why not return
> APR_TIMEUP instead of APR_EAGAIN?  but like Cliff said I wonder why the retval
> of apr_thread_cond_timewait() isn't appropriate?

Well, that's an additional good point.  :-)  But what I really meant was:
is it really correct to return APR_EAGAIN even if
apr_thread_cond_timedwait *succeeds*.  Because that's what it's doing
right now.  "return APR_EAGAIN;" is unconditional, even though its
indentation would make it appear otherwise.

--Cliff

Mime
View raw message