|
JOGL v2.6.0-rc-20250706
JOGL, High-Performance Graphics Binding for Java (public API).
|
Marker for a singleton global recursive blocking lock implementation, optionally locking a native windowing toolkit as well. More...
Public Member Functions | |
| void | lock () |
| Blocking until the lock is acquired by this Thread or a timeout is reached. More... | |
| void | unlock () |
| Release the lock. More... | |
| void | validateLocked () throws RuntimeException |
| void | dispose () |
| Dispose this instance. More... | |
Static Public Attributes | |
| static final boolean | DEBUG = Debug.debug("ToolkitLock") |
| static final boolean | TRACE_LOCK = Debug.isPropertyDefined("nativewindow.debug.ToolkitLock.TraceLock", true) |
Marker for a singleton global recursive blocking lock implementation, optionally locking a native windowing toolkit as well.
Toolkit locks are created solely via NativeWindowFactory.
One use case is the AWT locking on X11, see NativeWindowFactory#getDefaultToolkitLock(String, long).
Definition at line 43 of file ToolkitLock.java.
| void com.jogamp.nativewindow.ToolkitLock.dispose | ( | ) |
Dispose this instance.
Shall be called when instance is no more required.
This allows implementations sharing a lock via resources to decrease the reference counter.
| void com.jogamp.nativewindow.ToolkitLock.lock | ( | ) |
Blocking until the lock is acquired by this Thread or a timeout is reached.
Timeout is implementation specific, if used at all.
| RuntimeException | in case of a timeout |
| void com.jogamp.nativewindow.ToolkitLock.unlock | ( | ) |
Release the lock.
| RuntimeException | in case the lock is not acquired by this thread. |
| void com.jogamp.nativewindow.ToolkitLock.validateLocked | ( | ) | throws RuntimeException |
| RuntimeException | if current thread does not hold the lock |
|
static |
Definition at line 44 of file ToolkitLock.java.
|
static |
Definition at line 45 of file ToolkitLock.java.