On Tue, 2009-12-01 at 14:29 +0100, Alexander Larsson wrote: > On Thu, 2009-11-26 at 14:35 +0100, Alexander Larsson wrote: > > This was previously discussed here, but was sort of hidden in a > > technical discussion so it got no replies. I'm starting over in > order > > to > > reach a wider target for the discussion. > > > > I'll start with the proposal and then explain the reasons for it: > > > > Starting with next glib release: > > * libgobject links to libgthread > > * g_type_init() starts with: > > > > #ifdef G_THREADS_ENABLED > > if (g_thread_supported()) > > g_thread_init (NULL); > > #endif > > > > This means that everything above gobject can rely on thread > primitives > > being availible, and that global stuff in glib (mainloop, gslice, > > globals, etc) are threadsafe. > > I'm attaching a patch that implements this. > > In addition to enabling threads (if complied in) in g_type_init() it > adds a G_THREADS_MANDATORY define that if set causes all the > g_thread_supported() calls to be removed in the g_thread_* macros.
I added new split up patches for this to bugzilla with added docs and support for multiple calls to g_type_init(): https://bugzilla.gnome.org/show_bug.cgi?id=606775 Mattias looked at them and they are now in git master. Please try and give feedback. -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Alexander Larsson Red Hat, Inc al...@redhat.com alexander.lars...@gmail.com He's an all-American drug-addicted inventor with no name. She's a brilliant green-skinned safe cracker living on borrowed time. They fight crime! _______________________________________________ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list