The code change in this example did not involve any synchronization and so there are no issues with the locking behavior of the application.
本例中的这个代码更改没有涉及任何同步,因此也没有产生应用程序的锁定行为问题。
However, if reads greatly outnumber modifications, you can combine intrinsic locking and volatile variables to reduce the cost on the common code path.
然而,如果读操作远远超过写操作,您可以结合使用内部锁和volatile变量来减少公共代码路径的开销。
The snapshots are viewed using lock profiler in Terracotta administration console to find deadlocks and other locking hotspots in the application code.
我们可以利用Terracotta管理控制台的锁分析器(lock profiler)查看这些快照以找出应用中的死锁和其他可能发生死锁的地方。
应用推荐