message: Show a count of waiting items for QueuePool
diff: @@ -24,8 +24,12 @@ class QueuePool {
  this.queues.push(new Queue(fn));
  }
  this.overflow = new Queue(this._overflow.bind(this));
  + this._overflowCount = 0;
  }
  + get waitingItems() { return this._overflowCount; };
  +
  +
  // Add an item to the queue. ID and item are passed directly to the Queue.
  // Index is optional and should be between 0 ~ poolSize-1. It determines
  // which queue to put the item into, which will bypass the overflow queue.
  @@ -68,11 +72,13 @@ class QueuePool {
  p: queue.enqueue(req.id, req.item)
  });
  }
  + this._overflowCount++;
  // wait for any queue to become available
  let promises = this.queues.map((q) => {
  return q.onceFree();
  });
  return Promise.any(promises).then((q) => {
  + this._overflowCount--;
  if (q.size() !== 0) {
  throw new Error(`QueuePool overflow: starvation. No free queues.`);
  }
  