Re: Proposal: Enable threads by default
- From: Alexander Larsson <alexl redhat com>
- To: Alexander Larsson <alexl redhat com>
- Cc: "gtk-devel-list gnome org" <gtk-devel-list gnome org>
- Subject: Re: Proposal: Enable threads by default
- Date: Wed, 02 Dec 2009 12:03:18 +0100
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.
Running with this patch i ran into an issue while building gnome-shell:
GEN Gdm-1.0.gir
GThread-ERROR **: GThread system may only be initialized once.
aborting...
Command '['/gnome/src/gnome-shell/src/tmp-introspectpoWP_f/Gdm-1.0',
'--introspect-dump=/gnome/src/gnome-shell/src/tmp-introspectpoWP_f/types.txt,/gnome/src/gnome-shell/src/tmp-introspectpoWP_f/dump.xml']' returned non-zero exit status -5
Not sure exactly what crashed, but obviously something ran:
g_type_init() and then g_thread_init(). Maybe we need to make this a
non-fatal warning?
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Alexander Larsson Red Hat, Inc
alexl redhat com alexander larsson gmail com
He's a notorious bohemian librarian from a doomed world. She's a beautiful
renegade lawyer with the soul of a mighty warrior. They fight crime!
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]