code: public void flushTermination()
      {
          for (int i = 0; i < numberOfQueues; i++)
          {
              if (!terminateLists[i].isEmpty())
              {
                  this.submitTaskToQueue(this.createTerminateTask(terminateLists[i]), i, processedTerminates);
                  this.terminateLists[i] = new ArrayList(batchSize);
                  this.terminatesQueued++;
              }
          }
      }
docs: flushes any remaining objects. called automatically from waitUntilFinished().