One other bit of info that may help, basically what the wakeup main function does behind the scenes in GLib or Qt is that it writes a byte to a pipe the main thread is blocking on, thus kicking the main thread out of poll(). Or some other implementation with the same effect. Havoc