另一方面,如果锁被占有很长时间,那么自旋的线程只会消耗CPU而不做任何有用的工作,因此带来浪费。
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而不做任何有用的工作,因此带来浪费。
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.
应用推荐