Skip to content
Better HN
Top
New
Best
Ask
Show
Jobs
Search
⌘K
0 points
Kranar
5mo ago
0 comments
Share
It's a common misconception that std::shared_ptr is thread safe. The counter is thread safe, but the actual shared_ptr itself can not be shared across multiple threads.
There is now atomic_shared_ptr which is thread safe.
undefined | Better HN
0 comments
default
newest
oldest
delduca
5mo ago
It is now a template specialization of atomic std::atomic<std::shared_ptr<T>>.
j
/
k
navigate · click thread line to collapse