Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
Kranar
3 months ago
|
parent
|
context
|
favorite
| on:
A safe, non-owning C++ pointer class
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.
delduca
3 months ago
[–]
It is now a template specialization of atomic std::atomic<std::shared_ptr<T>>.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
There is now atomic_shared_ptr which is thread safe.