On the other hand, if the lock is held for a longer time, spinning is wasteful as the spinning thread consumes CPU without doing anything useful.
另一方面,如果锁被占有很长时间,那么自旋的线程只会消耗CPU而不做任何有用的工作,因此带来浪费。
2
In thefinal scene it appears to be spinning smoothly for a long time, he probably gaveit a lot of power.
在最后场景中,它平滑地旋转了很长一段时间,他可能给它很大一股劲儿。
3
This presents a problem for JVM implementers: if locks are only held for a short time, then spinning is more efficient; if locks are held for a long time, then suspension is more efficient.