Does a correctly synchronized program still allow data race?(Part I)
问题 There are two conclusions from JLS: C1: If a program is free of data races, then all executions of the program will appear to be sequentially consistent: data-race-free => sequentially consistent C2: If a program is correctly synchronized, then all executions of the program will appear to be sequentially consistent: correctly synchronized => sequentially consistent If the converse of C1 is true, then we can conclude that: C3: If a program is correctly synchronized, then it is free of data