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

I'd think a POSIX mutex--a standard API that I not only could implement anywhere, but which has already been implemented all over the place--is way more "cross platform" than use of atomics.


To lift things up a level: I think a language’s abstractions have failed if we even need to have a conversation around what “cross platform” really means :-)


If that's the bar, what language's abstractions haven't failed?


wasm and lambda calculus


If you're targeting a vaguely modern C standard, atomics win by being part of the language. C11 has atomics and it's straightforward to use them to implement thread-safe reference counting.




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

Search: