Re: [gtk-list] Re: multithreaded apps



Owen Taylor wrote:
> 
> As far as the locking for GTK+ goes, it looks right, though
> you need a gdk_threads_enter() gdk_threads_leave() pair around
> the call to gtk_main() in the main thread. Something like:
> 
>   gdk_threads_enter();
> 
>   window = create_window ();
>   gtk_widget_show (window);
> 
>   gtk_main();
> 
>   gdk_threads_leave();

I see no real difference (when I run the program) if I add these 2 new
lines. What is the difference ? What is the problem if I don't put the
gdk_threads_enter()/gdk_threads_leave() arround the gtk_main() ? Can I
leave the creation and showing outside the _threads_ pair ?

TIA,

Ionutz
-- 
Mental backup in progress - Do Not Disturb!
--
http://borco-ei.eng.hokudai.ac.jp/~borco/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]