On Thu, 20 Feb 2003, Peter Dimov wrote:

> Kevin Atkinson wrote:
> > #ifdef FAST_MUTEX_INIT_DESTROY
> >     Mutex() : l_(MUTEX_INIT) {}
> > #else
> >     Mutex() {pthread_mutex_init(&l_, 0);}
> >     ~Mutex() {pthread_mutex_destroy($l_);}
> > #endif
> 
> What makes you think that statically initializing a mutex is faster? It only
> defers the initialization until the first lock call occurs. Plus,
> pthread_mutex_init gives you the option to test for errors, should you
> decide to do so.

It depends on the implementation.  On some statically initialization is 
all that is needed.  Lets just drop the issue its not that important as 
the underlying Mutex class can easily be changed.

-- 
http://kevin.atkinson.dhs.org


_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to