On 03/14/2011 10:07 AM, Gordon Sim wrote:
Its the iterator that is the issue, not the smart pointer that it
points to. You test (it == bindingCache.end()) outside the lock and
that is not safe.
FYI -- .end() function is independent of the validity of the iterator.
'it' will either == the const of end, or ref the smart pointer which
is then safe, even if cleared. I maintain it it safe.
I'll set it to a temp variable to make it more readable, but as written
I believe it is thread safe.
Carl.
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:[email protected]