As far as I know in old versions of Boost boost::mutex implementation for Windows was done using critical sections. But in the newest version of Boost 1.51 I discovered that now mutex implementation is based on Events.
Does anybody know what is the rational behind this change? Was it done because of performance reasons? Do critical sections become deprecated?
Isn’t it wonderful that by using
boostwe always have best approach with no change?In new version of
boost,boost::mutexis implemented as an spinlock but with the help of a windows event to avoid busy wait and that event will only created if needed, thus it is very light weight and have a very high performance and also enableboostto use this light weightmutexfor timed wait! I think this is excellent