title: How to wait for async to finish
body: <p>I would like to run some async workflow, then wait for it to finish before printing some results, example:</p>
  
  <pre><code>let dowork n =
      async {
          do printfn "work %d" n
      }
  
  let creatework() =
      async {
          for x in [1..5] do
              Async.Start(dowork x)
      }
  
  Async.RunSynchronously(creatework())    
  printfn "finished"
  </code></pre>
  
  <p>when I run this, I want all the dowork calls to finish before printing "finished". However I get results like this:</p>
  
  <p>work 2
  work 3
  work 4
  work 5
  finished
  work 1</p>
  
  <p>I have tried removing async from creatework() but "finished" is printed before the async workflows are run.</p>
  
  <p>In the real dowork, the program performs some IO, so I want to wait for the slowest one to finish before continuing.</p>