
In software engineering, a spinlock is a lock which causes a thread trying to acquire it to simply wait in a loop (“spin”) while repeatedly checking if the lock is available(摘自wikipedia)。
利用cpu提供的原子原语来实现。
直接上码
|
|

In software engineering, a spinlock is a lock which causes a thread trying to acquire it to simply wait in a loop (“spin”) while repeatedly checking if the lock is available(摘自wikipedia)。
利用cpu提供的原子原语来实现。
|
|
近期评论