c++ - Are GTK Callbacks called from the main thread when using gtk_main_iteration? -
normally when using gtk3 callbacks gtk_main() function, expected callbacks maybe running in seperate thread programs main thread, , therefore thread safety measures need taken ensure callbacks thread safe.
however, if main thread deals gtk main events manually using gtk_main_iteration?
// processing here while (gtk_events_pending()) { gtk_main_iteration(); } // more processing here in situation, callbacks still run in separate thread? or launched main thread?
my program has lot going on , if turns out callbacks called main thread in setup, save me quite bit of thread safety work.
note: i'm working gtk3, believe applies both gtk2 , gtk3
Comments
Post a Comment