Terry Lambert wrote:
For certain uses, however, it's safe to not lock before the
read *on Intel architectures*.  This can go out the window on
SPARC or PPC, or any architecture where there is no guarantee
that there won't be speculative execution or out-of-order
execution without explicit synchronization.

Even on Intel architectures, the compiler can and will reorder operations. Hardware-level issues are only a part of the story.

I followed the Java Memory Model mailing lists for a while.
A lot of very bright, very experienced people thought they
had found ways to avoid locking and were wrong.

This stuff is hard. Do NOT underestimate it.

Tim

_______________________________________________
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to