2006/10/31, Mikhail Fursov <[EMAIL PROTECTED]>:
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?

Yes, I have done in addNewValue and thinking about getResult function.
I have also added using Method_Profile Handle in last patch.

For, Egor. Now I retabbed  this files in Vim and also switched from
tabs to spaces. I appreciated Your attentiveness. =)

Reply via email to