title: Unresponsive UI when using BeginInvoke
body: <p><strong>Bckground</strong><br>
  I have a networked application written in C#. my server program has a UI and several communication threads, that read from tcp sockets and display messages on controller UI.</p>
  
  <p>Communication with each client is done through a seprate thread. When i recieve some stream of messages from one client , the thread for that client writes on UI, which is a richtextbox on a Form.</p>
  
  <p>I call  SetTextHelper(string text) method of the form.</p>
  
  <p>which looks like this</p>
  
  <pre><code>private delegate void MyTextUpdateHandler(string text);
  public void SetTextHelper(string text)
  {
     BeginInvoke(new MyTextUpdateHandler(SetText), new object[] { text });
  }
  
  public setText(string text)
  {
     richtext.Text+= text;
  }
  </code></pre>
  
  <p><strong>Question</strong><br>
   -   If i use BeginInvoke my UI is  entirely unresponsive when i m writing large stream of data to UI
   -  Invoke solves that problem, but i read that for multi threaded  environment where many   thereads are sharing same resource Invoke can lead to deadlocks I share the common ichtextbox between around 16 threads
   - What would be a good desing for my situation?</p>