|
GlueGen v2.6.0-rc-20250712
GlueGen, Native Binding Generator for Java (public API).
|
Helper class to provide a Runnable queue implementation with a Runnable wrapper which notifies after execution for the invokeAndWait() semantics.
More...
Public Member Functions | |
| RunnableTask (final Runnable runnable, final Object syncObject, final boolean catchExceptions, final PrintStream exceptionOut) | |
| Create a RunnableTask object w/ synchronization, ie. More... | |
| final Runnable | getRunnable () |
| Return the user action. More... | |
| final void | run () |
Public Member Functions inherited from com.jogamp.common.util.TaskBase | |
| final Thread | getExecutionThread () |
Returns the execution thread or null if not yet run(). More... | |
| final Object | getSyncObject () |
| Return the synchronization object if any. More... | |
| final void | setAttachment (final Object o) |
| Attach a custom object to this task. More... | |
| final Object | getAttachment () |
| Return the attachment object if any. More... | |
| abstract void | run () |
| final void | flush (final Throwable t) |
| Simply flush this task and notify a waiting executor. More... | |
| final boolean | isInQueue () |
| final boolean | isExecuted () |
| final boolean | isFlushed () |
| final boolean | hasWaiter () |
| final Throwable | getThrowable () |
| final long | getTimestampCreate () |
| final long | getTimestampBeforeExec () |
| final long | getTimestampAfterExec () |
| final long | getDurationInQueue () |
| final long | getDurationInExec () |
| final long | getDurationTotal () |
| String | toString () |
Static Public Member Functions | |
| static RunnableTask | invokeOnCurrentThread (final Runnable runnable) |
Invokes runnable on the current Thread. More... | |
| static RunnableTask | invokeOnNewThread (final ThreadGroup tg, final String threadName, final boolean waitUntilDone, final Runnable runnable) |
Invokes runnable on a new InterruptSource.Thread, see InterruptSource.Thread#Thread(ThreadGroup, Runnable, String) for details. More... | |
Protected Attributes | |
| final Runnable | runnable |
Protected Attributes inherited from com.jogamp.common.util.TaskBase | |
| final Object | syncObject |
| final boolean | catchExceptions |
| final PrintStream | exceptionOut |
| final Throwable | sourceStack |
| Object | attachment |
| Throwable | runnableException |
| long | tCreated |
| long | tStarted |
| volatile long | tExecuted |
| volatile boolean | isExecuted |
| volatile boolean | isFlushed |
| volatile Thread | execThread |
Additional Inherited Members | |
Protected Member Functions inherited from com.jogamp.common.util.TaskBase | |
| TaskBase (final Object syncObject, final boolean catchExceptions, final PrintStream exceptionOut) | |
| final String | getExceptionOutIntro () |
| final void | printSourceTrace () |
Helper class to provide a Runnable queue implementation with a Runnable wrapper which notifies after execution for the invokeAndWait() semantics.
Definition at line 39 of file RunnableTask.java.
| com.jogamp.common.util.RunnableTask.RunnableTask | ( | final Runnable | runnable, |
| final Object | syncObject, | ||
| final boolean | catchExceptions, | ||
| final PrintStream | exceptionOut | ||
| ) |
Create a RunnableTask object w/ synchronization, ie.
suitable for invokeAndWait(), i.e. invoke(true, runnable).
| runnable | The user action |
| syncObject | The synchronization object if caller wait until runnable execution is completed, or null if waiting is not desired. |
| catchExceptions | Influence an occurring exception during runnable execution. If true, the exception is silenced and can be retrieved via getThrowable(), otherwise the exception is thrown. |
| exceptionOut | If not null, exceptions are written to this PrintStream. |
Definition at line 107 of file RunnableTask.java.
| final Runnable com.jogamp.common.util.RunnableTask.getRunnable | ( | ) |
Return the user action.
Definition at line 113 of file RunnableTask.java.
|
static |
Invokes runnable on the current Thread.
| runnable | the Runnable to execute on the current thread. The runnable must exit, i.e. not loop forever. |
RunnableTask Definition at line 49 of file RunnableTask.java.
|
static |
Invokes runnable on a new InterruptSource.Thread, see InterruptSource.Thread#Thread(ThreadGroup, Runnable, String) for details.
| tg | the ThreadGroup for the new thread, maybe null |
| threadName | the name for the new thread, maybe null |
| waitUntilDone | if true, waits until runnable execution is completed, otherwise returns immediately. |
| runnable | the Runnable to execute on the new thread. If waitUntilDone is true, the runnable must exit, i.e. not loop forever. |
RunnableTask Definition at line 66 of file RunnableTask.java.
| final void com.jogamp.common.util.RunnableTask.run | ( | ) |
Reimplemented from com.jogamp.common.util.TaskBase.
Definition at line 118 of file RunnableTask.java.
|
protected |
Definition at line 40 of file RunnableTask.java.