Class GParallelWorkQueueTask<T>

java.lang.Object
com.glitchybyte.glib.concurrent.GTask
com.glitchybyte.glib.concurrent.workqueue.GWorkQueueTask<T>
com.glitchybyte.glib.concurrent.workqueue.GParallelWorkQueueTask<T>
Type Parameters:
T - Type of work item.
All Implemented Interfaces:
GWorkQueue<T>, Runnable

public final class GParallelWorkQueueTask<T> extends GWorkQueueTask<T>
A task implementation of a {code GAsyncWorkQueue} that processes work items in parallel.
  • Constructor Details

    • GParallelWorkQueueTask

      public GParallelWorkQueueTask(String threadName, Consumer<T> processor)
      Creates a parallel work queue task.
      Parameters:
      threadName - Thread name.
      processor - Work item processor.
  • Method Details

    • processWork

      protected void processWork()
      Description copied from class: GWorkQueueTask
      This method processes each work item.

      Implementations MUST call workQueue.doWork.

      Specified by:
      processWork in class GWorkQueueTask<T>