Since upgrading Boost from 1.3.4 to 1.3.5, mutex operations have displayed dramatically worse performance. After some profiling it was discovered that the change to derive all mutexes from basic_timed_mutex is the cause. We use the mutexes almost exclusively with scoped lock. We have no need for a timed mutex and simply need a regular mutex for simple resource / memory protection between threads.

 

The basic_timed_mutex seems to do an awful lot of working in its constructor, calling various Gregorian date functions, calendar functions, xtime functions doing comparisons etc. This has lead to an approximate 5% performance loss for our performance sensitive application on the Win32 platform.

 

Is there a way to disable this heavy weight basic_timed_mutex, and use a plain old regular mutex ? Are the Boost Threads library maintainers aware of the performance penalties from using timed mutex for Windows platforms?

 

Simon

Attention:
This communication is confidential and may be legally privileged.  If you are not the intended recipient, please do not use, disclose, copy or distribute it, other than to return it to us with your confirmation that it has been deleted from your system.