From my own personal experience (yours may differ), I have found that using mutex to be extremely error prone. Instead I break code into tasks which can be either parallel or serial and I use the Intel Thread Building block data structures in the case where I have a container accessed by multiple threads. Using the TBB containers, I was able to make the entire MessageLogger thread safe and lock free.