Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

std::atomic really has different use cases. It is meant to be used for objects that can be modified via atomic RMW primitives and require T to be trivially copyable. While you can in principle implement arbitrary operations on top of those RMWs, it might not be the best fit.

For large Ts, is indeed implemented using a mutex or, more likely, a lock pool, so I guess if you squint hard enough it can be considered related.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: