Class RunnableTask

java.lang.Object
com.jogamp.common.util.TaskBase
com.jogamp.common.util.RunnableTask
All Implemented Interfaces:
Runnable

public class RunnableTask extends TaskBase
Helper class to provide a Runnable queue implementation with a Runnable wrapper which notifies after execution for the invokeAndWait() semantics.
  • Field Details

    • runnable

      protected final Runnable runnable
  • Constructor Details

    • RunnableTask

      public RunnableTask(Runnable runnable, Object syncObject, boolean catchExceptions, PrintStream exceptionOut)
      Create a RunnableTask object w/ synchronization, ie. suitable for invokeAndWait(), i.e. invoke(true, runnable).
      Parameters:
      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 TaskBase.getThrowable(), otherwise the exception is thrown.
      exceptionOut - If not null, exceptions are written to this PrintStream.
  • Method Details