On 31 Oct 2006 17:23:30 +0600, Egor Pasko <[EMAIL PROTECTED]> wrote:


The lock is not necessary if you update a single word. In case of
incrementing counters no synch is OK (minor inaccuracy), but here we
are updating an std::map, which is dangerous.


This is a problem! Even if we use map in read only mode we need
synchronization because the global map could be modified from the separate
thread in runtime when new profile is created.

Yuri, can you use Method_Profile_Handle here and avoid access to the global
map<Method,Profile> in addNewValue method?


--
Mikhail Fursov

Reply via email to