示例#1
0
 /**
  * Create a fat pipe using the threads from the parent
  *
  * @param producer the producer
  * @param pool the group of pipes to add to
  */
 public PooledFatPipe(Producer<T, S> producer, Pool pool, ExceptionListener listener) {
   this.producer = producer;
   this.listener = listener;
   this.pool = pool;
   name = producer.getClass().getSimpleName();
   lock = new Semaphore(0);
 }
示例#2
0
 /**
  * Create fat pipe using several threads
  *
  * @param producer the producer
  * @param poolSize the size of the thread group.
  */
 public PooledFatPipe(Producer<T, S> producer, int poolSize, ExceptionListener listener) {
   this(producer, poolSize, listener, producer.getClass().getSimpleName());
 }