Boost logo

Boost :

From: williamkempf_at_[hidden]
Date: 2001-09-25 15:31:56

--- In boost_at_y..., scleary_at_j... wrote:
> > POSIX implementation:
> >
> > static pthread_mutex_t m = PTHREAD_MUTEX_INITIALIZER;
> ...
> > Comments? Is the flaw in Boost.Threads or in my limited
> Boost.Threads is designed to be portable. There is no way to do
this under
> Win32 to my knowledge :(
> I think that is the reason that this (very useful) capability was
> included.

It can be emulated on Win32, as is done by pthreads-win32. However,
this is nothing more than a shortcut for using pthread_once. The
idea of static initialization doesn't play well with C++ objects, so
the shortcut is difficult to implement and not worth considering.

Bill Kempf

Boost list run by bdawes at, gregod at, cpdaniel at, john at