com.jogamp.common.util.locks
Interface LockExt
- All Superinterfaces:
- Lock
- All Known Subinterfaces:
- RecursiveLock, RecursiveThreadGroupLock
public interface LockExt
- extends Lock
Extending the Lock
features with convenient functionality.
getOwner
Thread getOwner()
- Returns:
- the Thread owning this lock if locked, otherwise null
isLockedByOtherThread
boolean isLockedByOtherThread()
isOwner
boolean isOwner()
isOwner
boolean isOwner(Thread thread)
validateLocked
void validateLocked()
throws RuntimeException
- Throws:
RuntimeException
- if current thread does not hold the lock
unlock
void unlock(Runnable taskAfterUnlockBeforeNotify)
- Execute the
Runnable taskAfterUnlockBeforeNotify
while holding the exclusive lock.
Then release the lock.