title: GTK3 and multithreading, replacing deprecated functions
body: <p>I would like to replace deprecated functions <code>gdk_threads_enter()/leave()</code> in my application that uses threads. The application as it is now, works perfect (<em>although i am not sure if this is the right way to do it</em>).</p>
  
  <p>My main loop, runs the <code>gtk_main</code> and the signal handlers. When i receive a start button, i start a thread, that runs in the background along the main. How can i update the GUI from that thread. I know per the Documentation of GTK3 and GDK3, they say avoid it by using </p>
  
  <pre><code>gdk_threads_add_idle() 
  </code></pre>
  
  <p>or </p>
  
  <pre><code>gdk_threads_add_timeout() 
  </code></pre>
  
  <p>But how do I do this if I want the updating to be done only when I click start?
  is there any example. I am not asking how to use <code>gdk_threads_add_idle()</code>, I am asking how to run  worker function in the main without a thread after clicking start.</p>
  
  <p><strong>Button clicked --> start the worker function "in thread previously" --> update large amount of GUI elements in the GUI window.</strong></p>