title: Cross Thread UI
body: <p>I have an issue with cross threading on a UI.  I have read all the ways to do it and have implemented them as seen below.</p>
  
  <pre><code>public void UpdateList(object obj)
      {
          // do we need to switch threads?
          if (listBox1.InvokeRequired)
          {
              MethodInvoker del = () =&gt; UpdateList(obj);
              this.Invoke(del);
              return;
         }
          // ok so now we're here, this means we're able to update the control
          // so we unbox the object into a string
          string text = (string)obj;
          // and update
          listBox1.Items.Add(text);
      }
  </code></pre>
  
  <p>The issue comes when I try to do a </p>
  
  <pre><code>hubConnection.Start().Wait();
  </code></pre>
  
  <p>After that call I am trying to update my list.</p>
  
  <p>Without the wait is fine.  When I add the Wait it hangs on the UpdateList Invoke.  There is no error...it just hangs.</p>
  
  <p>I am handling this call in a button event.</p>