|
GlueGen v2.6.0-rc-20250712
GlueGen, Native Binding Generator for Java (public API).
|
Extending the Lock features with convenient functionality.
More...
Public Member Functions | |
| boolean | isLockedByOtherThread () |
| Query whether the lock is hold by the a thread other than the current thread. More... | |
| boolean | isOwner (Thread thread) |
| Query whether the lock is hold by the given thread. More... | |
| Thread | getOwner () |
| void | validateLocked () throws RuntimeException |
| void | unlock (Runnable taskAfterUnlockBeforeNotify) |
Execute the Runnable taskAfterUnlockBeforeNotify while holding the exclusive lock. More... | |
Public Member Functions inherited from com.jogamp.common.util.locks.Lock | |
| void | lock () throws RuntimeException |
Blocking until the lock is acquired by this Thread or TIMEOUT is reached. More... | |
| boolean | tryLock (long timeout) throws InterruptedException |
Blocking until the lock is acquired by this Thread or maxwait in ms is reached. More... | |
| void | unlock () throws RuntimeException |
| Release the lock. More... | |
| boolean | isLocked () |
| Query if locked. More... | |
Additional Inherited Members | |
Static Public Attributes inherited from com.jogamp.common.util.locks.Lock | |
| static final boolean | DEBUG = Debug.debug("Lock") |
Enable via the property jogamp.debug.Lock More... | |
| static final boolean | TRACE_LOCK = Debug.isPropertyDefined("jogamp.debug.Lock.TraceLock", true) |
Enable via the property jogamp.debug.Lock.TraceLock More... | |
| static final long | DEFAULT_TIMEOUT = 5000 |
The default TIMEOUT value, of {@value} ms. More... | |
| static final long | TIMEOUT = Debug.getLongProperty("jogamp.common.utils.locks.Lock.timeout", true, DEFAULT_TIMEOUT) |
The TIMEOUT for lock() in ms, defaults to DEFAULT_TIMEOUT. More... | |
Extending the Lock features with convenient functionality.
Definition at line 34 of file ThreadLock.java.
| Thread com.jogamp.common.util.locks.ThreadLock.getOwner | ( | ) |
| boolean com.jogamp.common.util.locks.ThreadLock.isLockedByOtherThread | ( | ) |
Query whether the lock is hold by the a thread other than the current thread.
| boolean com.jogamp.common.util.locks.ThreadLock.isOwner | ( | Thread | thread | ) |
Query whether the lock is hold by the given thread.
| void com.jogamp.common.util.locks.ThreadLock.unlock | ( | Runnable | taskAfterUnlockBeforeNotify | ) |
Execute the Runnable taskAfterUnlockBeforeNotify while holding the exclusive lock.
Then release the lock.
Implemented in com.jogamp.common.util.locks.RecursiveThreadGroupLock.
| void com.jogamp.common.util.locks.ThreadLock.validateLocked | ( | ) | throws RuntimeException |
| RuntimeException | if current thread does not hold the lock |