thread issue, how to make the runtime run with gtk_main at the same time