Exemplo n.º 1
0
 public ExecutorThreadPoolManager(IExecutorService executorService, ThreadPoolType poolType, int threads,
                                  int capacity, ExecutorProcessItemHandler <T> handler)
     : base(executorService)
 {
     _handler               = handler;
     _executor              = ThreadPoolExecutorFactory.CreateThreadPool <T>(executorService, poolType, threads, -1);
     _executor.ProcessItem += OnExecutor_ProcessItem;
 }
Exemplo n.º 2
0
 public ExecutorThreadPoolManager(IExecutorService executorService, int threads, ExecutorProcessItemHandler <T> handler)
     : this(executorService, ThreadPoolType.NonBlockQueue, threads, -1, handler)
 {
 }