
24 Apr
2013
24 Apr
'13
4:02 p.m.
On Wed, Apr 24, 2013 at 8:56 AM, Slava
Sure? Looking at boost 1.53 headers I see it is not thread safe:
I believe the source isn't easy to follow on this, there are multiple macros depending on what platform and config macro you use. Also, I believe the atomic "lockfree" counting happen in the shared_count type, not directly into the shared_ptr class. Nevertheless, all documentation I found through years suggest that it is mandatory that shared_ptr counting is thread-safe because it makes sharing between threads dangerous otherwise. Unfortunately I don't have the standard available to check if std::shared_ptr is HAVE TO be implemented this way. Joel Lamotte