title: Groovy GPars, need index for each thread launched
body: <p>Using GPars with Groovy, I launch 3 threads to do some work in parallel...</p>
  
  <pre><code> GParsPool.withPool(3){ 
     result = myList.collectParallel{
        processItem(it)
     }
   }
  </code></pre>
  
  <p>This works fine, but I need an index in the closure that represents the thread number launched. Not sure how to access such an index since there is no loop; everything is happening in parallel. </p>
  
  <p>I tried using <code>eachWithIndexParallel</code>, this, but Groovy complains of no such method for (ArrayList, Integer)</p>
  
  <pre><code>GParsPool.withPool(3) {
      result = myList.eachWithIndexParallel{ i -&gt; 
          processItem( it, i)
      }
  }
  </code></pre>