java.lang.Object
br.com.objectos.testing.concurrent.DirectCpuWorker
All Implemented Interfaces:
CpuWorker

public final class DirectCpuWorker extends Object implements CpuWorker
An CpuWorker that immediately executes any offered task.
Since:
2
  • Method Details

    • get

      public static DirectCpuWorker get()
      Returns the only instance of this class.
      Returns:
      the only instance of this class
    • offer

      public final boolean offer(CpuTask task)
      Immediatly executes the specified task to its completion.
      Specified by:
      offer in interface CpuWorker
      Returns:
      true always