title: beginInvoke, GUI and thread
body: <p>I have application with two thread. One of them (T1) is main GUI form, another (T2) is function working in loop. When T2 gets some information must call function with GUI form. 
  I'm not sure that I do it right.</p>
  
  <p>T2 call function FUNCTION, which update something in GUI form.</p>
  
  <pre><code>  public void f() {
          // controler.doSomething();
    }
  
  
   public void FUNCTION() {
  
      MethodInvoker method = delegate {
              f();
      };
  
      if ( InvokeRequired ) {
          BeginInvoke( method );
      } else {
              f();
      }
   }
  </code></pre>
  
  <p>But now I must declare two function. How does it using only one function? Or how does it right.</p>