message: Enforce batchsize to kick off regardless of the state of the batchmanager.
diff: @@ -17,8 +17,6 @@ export class BatchManager<T> {
  this.pendingWork[id].push(work);
  - if (!this.workPending) {
  - this.workPending = new Deferred<void>();
  if (this.pendingWork[id].length >= this.batchSize) {
  this.startWork();
  }
  @@ -26,7 +24,6 @@ export class BatchManager<T> {
  this.startWork();
  });
  }
  - }
  /**
  * Resolves once all pending work is complete
  @@ -36,6 +33,8 @@ export class BatchManager<T> {
  }
  private startWork() {
  + if (!this.workPending) {
  + this.workPending = new Deferred<void>();
  // Clear the internal flags first to avoid issues in case any of the pending work calls back into
  // the batch manager. We could also do this with a second setImmediate call but avodiing in order
  // to process the work quicker.
  @@ -48,6 +47,7 @@ export class BatchManager<T> {
  // batch of work until this current one is done (or has errored)
  this.processPendingWork(pendingWork);
  }
  + }
  private processPendingWork(pendingWork: { [id: string]: T[] }) {
  console.log(`Actually working`);
  