The function g_idle_add() is often used to connect a signal in the main thread from another thread see http://developer.gnome.org/glib/stable/glib-The-Main-Event-Loop.html
for more details. Just remember to return FALSE from the call-back function otherwise it will be called repeatedly.
As a note Glib is totally thread safe, but you still need to use locks if working on the same bit of data in more than one thread. GTK and GDK are thread aware, but not thread safe and calling it from more than one thread only works under X11 (with locks and plenty of care) and not WIN32.