[gstreamer-bugs] [Bug 608398] Initializing the glib thread system seems not to work

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Fri Jan 29 07:59:43 PST 2010


https://bugzilla.gnome.org/show_bug.cgi?id=608398
  GStreamer | gstreamer (core) | git

--- Comment #8 from Sebastian Dröge <slomo at circular-chaos.org> 2010-01-29 15:59:41 UTC ---
(In reply to comment #7)
> > > So there's no need to call g_thread_init() very early in the program any more?
> > > Before other GLib functions are called, etc.? As I see it, the assumption is
> > > sort of that g_type_init() is called first thing in main() now, more or less,
> > > and -DG_THREADS_MANDATORY only seems to be used in GObject, but not in GLib
> > > itself.
> > 
> > Yes, either call it always (it can be called multiple times) or assume
> > g_type_init() calls it
> 
> The reason we added the warning was that calling g_thread_init() too late
> caused mysterious issues with GSlice, and at the time the GLib people argued
> that that was fine because g_thread_init() was supposed to be called *first
> thing* in main() and behaviour was undefined if that was not the case, so it's
> not their problem.
> 
> Has that been officially changed now to 'just call g_thread_init() before you
> use any threading primitives?'

Yes, see the latest version of the GLib docs. It's also mentioned in the last
release notes.

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.



More information about the Gstreamer-bugs mailing list