title: GUI not updating until code is finished
body: <p>Hey, I have a sequence of code that goes something like this:</p>
  
  <pre><code>label.Text = "update 0";
  doWork();
  label.Text = "update 1";
  doWork2();
  label.Text = "update 2";
  </code></pre>
  
  <p>Basically, the GUI does not update at all, until all the code is done executing. How to overcome this?</p>