On Fri, 2008-10-03 at 17:31 -0400, Alan Conway wrote: > ... > (1) my usual style being: > - all public member functions are thread safe. > - use ScopedLock to acquire/release locks. > - private, unlocked functions that are only intended to be called with > the lock already held take a dummy extra paramater of type ScopedLock& > > The dummy ScopedLock& parameter marks functions that are not locked and > also makes it hard to accidentally call them in an unlocked context.
This would explain why I occasionally see odd functions with an unused ScopedLock& parameter, and try and figure out why the person who wrote it did that. Then sigh, and go and remove the useless parameter before checking in my changes. Did I miss a wiki note/or an email? Oh, such is life. Andrew
