code: public void forAllInParallel(final ParallelProcedure procedure)
      {
          MithraCpuBoundThreadPool pool = MithraCpuBoundThreadPool.getInstance();
          final Object[] set = this.table;
          ThreadChunkSize threadChunkSize = new ThreadChunkSize(pool.getThreads(), set.length - 2, 1);
          final ArrayBasedQueue queue =new ArrayBasedQueue(set.length - 2, threadChunkSize.getChunkSize());
          int threads = threadChunkSize.getThreads();
          procedure.setThreads(threads, this.size() /threads);
          CpuBoundTask[] tasks = new CpuBoundTask[threads];
          for(int i=0;i<threads;i++)
          {
              final int thread = i;
              tasks[i] = new CpuBoundTask()
              {
                  @Override
                  public void execute()
                  {
                      ArrayBasedQueue.Segment segment = queue.borrow(null);
                      while(segment != null)
                      {
                          for (int i = segment.getStart(); i < segment.getEnd(); i++)
                          {
                              Object e = arrayAt(set, i);
                              if (e != null)
                              {
                                  procedure.execute(e, thread);
                              }
                          }
                          segment = queue.borrow(segment);
                      }
                  }
              };
          }
          new FixedCountTaskFactory(tasks).startAndWorkUntilFinished();
      }
docs: does not allow concurrent iteration with additions to the index