public class Locker extends Object
This is a lock designed to protect VERY short sections of critical code. Threads attempting to take the lock will wait until the lock is available, thus it is important that the code protected by this lock is extremely simple and non blocking.
try(SpinLock.Lock lock = locker.lock()) { // something very quick and non blocking }
Modifier and Type | Class and Description |
---|---|
class |
Locker.Lock |
public Locker.Lock lock()
public boolean isLocked()
Copyright © 1995-2015 Webtide. All Rights Reserved.