Tag: memory visibility

为什么这个Java程序终止,尽pipe这显然不应该(也没有)?

今天我实验室的一个敏感操作完全错了。 电子显微镜上的执行器越过了边界,经过一连串的事件,我损失了1200万美元的设备。 我已经在故障模块中缩小了40多条线路,这是因为: import java.util.*; class A { static Point currentPos = new Point(1,2); static class Point { int x; int y; Point(int x, int y) { this.x = x; this.y = y; } } public static void main(String[] args) { new Thread() { void f(Point p) { synchronized(this) {} if (p.x+1 != py) { […]