title: How to invoke async operation as sync?
body: <p>I have a third party service which have async DoAsync() operation and Done() event. How can I create my own sync DoSync() operation?
  I want smth like this (in pseudocode):</p>
  
  <pre><code>operation DoSync()
  {
      DoAsync();
      wait until Done();
  }
  </code></pre>