From: Anthony Williams (anthony_at_[hidden])
Date: 2007-12-06 10:45:06
Quoting Moshe Matitya <Moshe.Matitya_at_[hidden]>:
> Windows Vista and Windows Server 2008 introduced several new thread
> synchronization primitives. These include:
> * Condition variables
> * Read/Write locks
> * One-time initialization
> For details, see:
> Are there any plans to utilize these new API's in the library
> implementation when running on platforms that support them?
Short answer: no.
Long answer: The new Microsoft implementations are too limited to make
it worthwhile reimplementing the relevant parts of boost in terms of
The one-time initialization routine doesn't handle the case that the
initialization function throws an exception. The POSIX code avoids
pthread_once for the same reason.
The reader-writer locks don't support try- or timed-lock facilities,
nor do they support upgrading.
The condition variable can only be used with CRITICAL_SECTIONs or the
new reader-writer locks, which is quite limiting. They also don't
support absolute-time timeouts. Having just spent time implementing
absolute-time timeouts correctly for condition variables on Windows, I
don't fancy reverting to a relative-time-only facility.
Microsoft missed the boat with this lot: they might have been useful
if they were in Windows 2000, or even Windows XP, but they are too
little, too late.
-- Anthony Williams Just Software Solutions Ltd - http://www.justsoftwaresolutions.co.uk Registered in England, Company Number 5478976. Registered Office: 15 Carrallack Mews, St Just, Cornwall, TR19 7UL