title: Playframework parallel rendering
body: <p>I want to process several tasks in parallel inside a Action, and push back any task result in first-completed order and as soon as it completes.</p>
  
  <p>For example, if task A completes in 5 secs, task B completes in 3 secs and task C completes in 1 sec, the output should be "C", "B", "A".</p>
  
  <p>The following codes seems output the wrong order and await all the task completes before output the result.</p>
  
  <pre><code>def lookup  = Action { implicit  req =&gt;
      val a = Enumerator( Await.result(Promise.timeout("A", 5 seconds), 1 minute))
      val b = Enumerator( Await.result(Promise.timeout("B", 3 seconds), 1 minute))
      val c = Enumerator( Await.result(Promise.timeout("C", 1 second), 1 minute))
  
      val d = a &gt;- b &gt;- c
  
      Ok.chunked(d &amp;&gt; Comet(callback = "console.log"))
  }
  </code></pre>