Without the theFlooble reference being volatile, the code in doWork() would be at risk for seeing a partially constructed Flooble as it dereferences the theFlooble reference.
如果theFlooble引用不是volatile 类型,doWork() 中的代码在解除对 theFlooble 的引用时,将会得到一个不完全构造的Flooble。
Without the theFlooble reference being volatile, the code in doWork() would be at risk for seeing a partially constructed Flooble as it dereferences the theFlooble reference.
如果theFlooble引用不是volatile 类型,doWork() 中的代码在解除对 theFlooble 的引用时,将会得到一个不完全构造的Flooble。
应用推荐