Boost logo

Boost :

Subject: Re: [boost] Mutexes claim a Windows event handle
From: David Abrahams (dave_at_[hidden])
Date: 2010-06-01 14:20:01


At Tue, 1 Jun 2010 12:30:20 -0500,
Christian Holmquist wrote:
>
> > >
> > > Why do you need so many mutexes?
> >
> > Yeah, as a threading non-expert but somewhat educated bystander, what
> > Richard described smells like a design with many locks at object
> > granularity, which is almost always a mistake. Have you considered
> > revisiting the architecture?
> >
> > --
> >
>
>
> What is the alternative to placing the mutex at object level? Having some
> kind of mutex pool?

“at object level” != “object granularity”

By the latter I mean a system where every object has its own mutex,
without regard to the invariants *between* objects in the system that
must be protected.

-- 
Dave Abrahams
BoostPro Computing
http://www.boostpro.com

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk