Boost logo

Boost :

From: Anthony Williams (anthwil_at_[hidden])
Date: 2002-08-07 05:42:24

> From: Alexander Terekhov [mailto:terekhov_at_[hidden]]
> Sent: 06 August 2002 22:44
> > Anthony Williams wrote:
> [...]
> > On POSIX, you can statically initialize a mutex, as mutexes are POD.
> >
> > On Windows, mutexes are always dynamically initialized. However, you
> > can ensure they are only initialized once by using named mutexes.
> Yeah, but somehow it's still possible to use POSIX mutexes [static
> including] even on Windows. ;-)

I know --- I use pthreads-win32 at work. However, I wouldn't want to impose
the requirement that every user of Boost Threads also install

OTOH, it might be worth checking out their implementation of statically
initialized mutexes, since they use Win32 Semaphores and Critical Sections
rather than Win32 Mutexes.

However, I'm not sure we want POSIX semantics --- it poses an unnecessary
burden on the users to have to specify a static initializer or call a
dynamic init function, it is much preferable to just have Mutex() do the
Right Thing in all cases.


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