JOGL v2.6.0-rc-20250706
JOGL, High-Performance Graphics Binding for Java™ (public API).
com.jogamp.nativewindow.ToolkitLock Interface Reference

Marker for a singleton global recursive blocking lock implementation, optionally locking a native windowing toolkit as well. More...

Collaboration diagram for com.jogamp.nativewindow.ToolkitLock:

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)
 

Detailed Description

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.

Member Function Documentation

◆ dispose()

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.

Here is the caller graph for this function:

◆ lock()

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.

Exceptions
RuntimeExceptionin case of a timeout
Here is the caller graph for this function:

◆ unlock()

void com.jogamp.nativewindow.ToolkitLock.unlock ( )

Release the lock.

Exceptions
RuntimeExceptionin case the lock is not acquired by this thread.
Here is the caller graph for this function:

◆ validateLocked()

void com.jogamp.nativewindow.ToolkitLock.validateLocked ( ) throws RuntimeException
Exceptions
RuntimeExceptionif current thread does not hold the lock
Here is the caller graph for this function:

Member Data Documentation

◆ DEBUG

final boolean com.jogamp.nativewindow.ToolkitLock.DEBUG = Debug.debug("ToolkitLock")
static

Definition at line 44 of file ToolkitLock.java.

◆ TRACE_LOCK

final boolean com.jogamp.nativewindow.ToolkitLock.TRACE_LOCK = Debug.isPropertyDefined("nativewindow.debug.ToolkitLock.TraceLock", true)
static

Definition at line 45 of file ToolkitLock.java.


The documentation for this interface was generated from the following file: