与此形成对比的是,无锁定算法要求仅某个线程总是执行操作。
By contrast, a lock-free algorithm requires only that some thread always make progress.
该分配被认为是无争用锁定操作中最大的可变开销。
The allocation is considered the largest variable cost in an uncontested lock operation.
如果已知锁定是无争用的但是难以避免或删除同步指令,则对这些锁定花费一点小的确定的开销不失为明智的做法。
It can be desirable to have a small and deterministic cost for locking that is known to be uncontested but where synchronization directives are hard to avoid or remove.
应用推荐