help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Read access to std::map from multiple threads


From: mathieu
Subject: Re: Read access to std::map from multiple threads
Date: Fri, 20 Jun 2008 02:37:51 -0700 (PDT)
User-agent: G2/1.0

On Jun 20, 8:24 am, Paul Pluzhnikov <ppluzhnikov-...@gmail.com> wrote:
> mathieu <mathieu.malate...@gmail.com> writes:
> > On Jun 18, 9:15 pm, Francis Litterio <em...@not.available> wrote:
> >> mathieu wrote:
> ...
> >> > std::map. Those accesses are concurrent (SMP machine). Is there
> >> > something I need to do even for read only access ?
>
>                                      ^^^^^^^^^^^^^^^^
> ...
>
> > #4  0x00002b78ba63bc3f in std::map<...>::insert ()
>
> What made you believe that map::insert() is a read-only access?

I wrote my comment backward... I finally understood what went wrong
when I hit to particular seg fault. the previous seg fault would
appear much later during a read access to the std::map (I did not
understood it had been trashed by incorrect write access).

Sorry for the confusion
-Mathieu
Ps: I was trying to 'be smart' and delay the loading (=write) of the
std::map only at the first user request but that was just stupid...


reply via email to

[Prev in Thread] Current Thread [Next in Thread]