Jeff Verdegan wrote:You mean as opposed to multihtreaded code running on a single CPU?
No.
It doesn't matter what kind of hardware your code runs on. When writing multithreaded code, you always have to take the same steps to ensure proper handling of shared data. One CPU or a thousand, it makes no difference.
Henry Wong wrote:
Jeff Verdegan wrote:You mean as opposed to multihtreaded code running on a single CPU?
No.
It doesn't matter what kind of hardware your code runs on. When writing multithreaded code, you always have to take the same steps to ensure proper handling of shared data. One CPU or a thousand, it makes no difference.
Having worked with JVMs running on hundreds of cores, I have to recommend that there is a difference (regarding testing) -- and if you intend to run your application in production with hundreds of cores, make sure that your test environment also has hundreds of cores.
It is amazing how easy race conditions show up when there are hundreds of cores, and never do, when there are only a handful.
Jeff Verdegan wrote: so there's nothing additional that you have to take into account in order to write correct code.
Pat Farrell wrote:
But I also maintain that "writing correct code" using Java is far harder than most folk think when they start reading about the subject.