Subj : Re: Improving read-write lock To : comp.programming.threads From : Howard Hinnant Date : Thu Feb 24 2005 06:30 pm In article , "Joe Seigh" wrote: > > Why do you think leaving the lock locked would be a better default? > > > You need to explicitly ensure the shared data is in a valid state. If > so than you can manually reset the lock. Otherwise it's better to leave > the lock locked and let everything hang. Code that leaves data in an invalid state when an exception propagates out is broken anyway. It won't matter whether you unlock the mutex or not. Writing in C++ means writing code that satisfies at least the basic exception guarantee, (whether or not multi-threading is involved). -Howard .