apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Marr <gr...@alum.wpi.edu>
Subject Re: Thread pool prototype
Date Wed, 03 May 2006 13:41:14 GMT
At 05:32 AM 5/3/2006, Joe Orton wrote:
> > +    me->cnt_max = max_threads;
> > +    me->idle_max = init_threads;
> > +    rv = apr_thread_mutex_create(&me->lock, 
> APR_THREAD_MUTEX_NESTED,
> > +                                 me->pool);
> > +    if (APR_SUCCESS != rv) {
>
>Personally I find the "constant != variable" style very distracting, 
>not sure if this is a widely held view...

FYI, I use it almost exclusively, because if you mean to type

if (APR_SUCCESS == rv)

and instead you type

if (APR_SUCCESS = rv)

the compiler will catch it for you.  If you normally do variable == 
constant instead, you have no such protection.


Mime
View raw message