If in doubt, consider a synchronized wrapper.
如果情况不确定,考虑使用同步包装。
To illustrate an offline application in action, a synchronized contacts sample is provided.
为了演示使用中的脱机应用程序,这里给出了一个同步的联系人示例。
The compiler is allowed to move statements into a synchronized block — just not out of it.
编译器可以把语句移入synchronized块——而不仅仅是把语句移出。
应用推荐