title: Task.async in Elixir Stream
body: <p>I want to do a parallel map over a big list. The code looks somewhat like this:</p>
  
  <pre><code>big_list
  |&gt; Stream.map(&amp;Task.async(Module, :do_something, [&amp;1]))
  |&gt; Stream.map(&amp;Task.await(&amp;1))
  |&gt; Enum.filter filter_fun
  </code></pre>
  
  <p>But I was checking Stream implementation and as far as I understand <code>Stream.map</code> combines the functions and applies combined function to elements in the stream, which would mean that the sequence is like this:</p>
  
  <ol>
  <li>Take first element</li>
  <li>Create async task</li>
  <li>Wait for it to finish</li>
  <li>Take second elelemnt...</li>
  </ol>
  
  <p>In that case, it doesn't do it in parallel. Am I right or am I missing something?</p>
  
  <p>If I am right, what about this code?</p>
  
  <pre><code>Stream.map Task.async ...
  |&gt; Enum.map Task.await ...
  </code></pre>
  
  <p>Is that going to run in parallel?</p>