Class WorkManager

java.lang.Object
org.jvnet.hk2.config.WorkManager
All Implemented Interfaces:
Executor

public class WorkManager extends Object implements Executor
Simple helper for managing work sent to a foreign executor service.

Has similarities to Fork and Join.

The implementation is designed such that Tasks-1 are sent to the executor service for possibly another thread to handle. The last task is executed by the caller thread so that all threads are attempted to be fully utilized for processing including the caller's thread.

Author:
Jeff Trent
  • Constructor Details

    • WorkManager

      public WorkManager(Executor exec)
    • WorkManager

      public WorkManager(Executor exec, int tasksToDo)
  • Method Details