title: Kotlin Process Collection In Parallel?
body: <p>I have a collection of objects, which I need to perform some transformation on. Currently I am using:</p>
  
  <pre><code>var myObjects: List&lt;MyObject&gt; = getMyObjects()
  
  myObjects.forEach{ myObj -&gt;
      someMethod(myObj)
  }
  </code></pre>
  
  <p>It works fine, but I was hoping to speed it up by running <code>someMethod()</code> in parallel, instead of waiting for each object to finish, before starting on the next one.</p>
  
  <p>Is there any way to do this in Kotlin? Maybe with <code>doAsyncTask</code> or something?</p>
  
  <p>I know when this was <a href="https://stackoverflow.com/questions/34697828/parallel-operations-on-kotlin-collections">asked over a year ago</a> it was not possible, <strong>but now that Kotlin has coroutines like <code>doAsyncTask</code> I am curious if any of the coroutines can help</strong></p>