
"Alexander Gutenev"
I consider changing from win32 CRITICAL_SECTIONs to Boost.Thread mutexes.
boost::mutex isn't CRITICAL_SECTION, but boost::detail::lightweight_mutex is. Does this mean that boost::mutex is heavy-weight ?
No. boost::mutex is a lightweight mutex. It has slightly different performance characteristics than CRITICAL_SECTION: it is intended to be "better" than CRITICAL_SECTION.
If not so, what's the reason for boost::detail::lightweight_mutex to exist ?
I think it's a historic artifact from versions of boost.thread prior to 1.35.0 when boost::mutex required linking to the thread library, which allowed mutexes to be used in header-only boost libraries. I'll leave it to Peter to comment on whether he thinks it's still required and why. Anthony -- Anthony Williams | Just Software Solutions Ltd Custom Software Development | http://www.justsoftwaresolutions.co.uk Registered in England, Company Number 5478976. Registered Office: 15 Carrallack Mews, St Just, Cornwall, TR19 7UL