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

Which bit of "This makes volatile objects suitable for communication with a signal handler, but not with another thread of execution" is unclear?

In fact, Standards notwithstanding, real compilers routinely optimize away volatile operations if they deduce nothing can see the object -- e.g., it is on the stack, and its address has not been taken. And they will happily re-order reads from and stores to other objects around a volatile operation. Furthermore, caches don't know squat about volatile, so they will eagerly re-order the volatile ops, besides.

So, no, he did not have a point. He was just wrong, wrong, wrong. But it never caused him any personal distress.



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

Search: