Skip to content
Better HN
Top
Best
Ask
Show
New
Jobs
Search
⌘K
0 points
Kranar
9mo ago
0 comments
Save
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.
0 comments
1 comments · 1 top-level
top
newest
oldest
delduca
9mo ago
It is now a template specialization of atomic std::atomic<std::shared_ptr<T>>.
j
/
k
navigate · click thread line to collapse