Only one thread have to own the GUI control at a time. So, if you want to access GUI from several simultaneously running threads ..... you can not do that.
The main 2 ways to solve this is to use g_add_timeout () and g_thread_enter /g_thread_leave ()
And about the example... I have no such one now but tomorrow will check my sources..
Recently I found this site. http://www.gtk-server.org/index.html
This is Gtk server and it listenes for incomming connections on basic I/O files and pipes.
It is possible to write a Gtk application without to use C/C++ or any other programming language.. just write files, type commands and the application will be created. Cool!!