Thanks for your investigations and patches.
On Mon, 21 Feb 2005 20:21:23 +0100
Mirko Maischberger <mirko@...> wrote:
> Mirko Maischberger wrote:
> > Hi,
> > I've made a little test program in C to study the deadlock without ruby
> > overhead. The first version  works well without the deadlocking
> > problem. The second one locks in many situation including the
> > macromedia.com home page.
> I've made a patch to move g_thread_init and gdk_threads_init outside of
> Gtk.init, but i've only moved the calls to Gdk::Threads.init.
Hmm. I think it's better to implement both of wrapper of g_thread_init,
# BTW, if you send your patches, use diff with -u option, please.
> I've had the luck of talking with Federico Mena-Quintero on #gtk+ and,
> as i understand, calling gdk_threads_init forces the user to call
> enter/leave even for the main thread.
> <mirko> federico, i've read the manual
> <mirko> but i can't understand from that statement if i should call
> enter/leave even if i dont create any thread
> <mirko> federico, i've written two test programs:
> http://mirko.lilik.it/ruby-gnome2/moztest-lock.c and
> <mirko> the only difference is that the -lock version calls gdk_threads_init
> <mirko> and i'm a little puzzled
> <federico> mirko: yes, you have to call them
> <federico> there's still a lock that needs to be maintained
> <federico> once you bring in threads, everyone gets pain :)
> <mirko> federico, thank you
> <mirko> federico, actually i dont bring threads in, the language binding
> does that for me :)
> I'm not sure what Gdk::Threads.init could be used for.
Hmm. In this discussion, federico says: "you have to call them".
If it's true, it's not bad idea to call them in init.c, is it?
.:% Masao Mutoh<mutoh@...>