From: Peter Dimov (pdimov_at_[hidden])
Date: 2005-10-16 05:44:23
Keith Burton wrote:
> Given the nice simple definition of the container ( "hashed
> associative container that can be used without synchronization from
> multiple threads" ) , I believe find_and_visit should synchronise
> despite the breaking the "C don't pay for what is not used" mantra.
> Unless, of course, two functions are provided.
Two functions won't do, since the map provides several other ways to read
the element that may be being modified, and all of these would need
synchronization as well. The problem that I don't know how to solve yet is
that a thread may be holding an iterator to the element, and there is no way
to inject synchronization there. (I've never liked proxy references much
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk