[gst-devel] Possible race-condition when using g_enum_register_static
t.i.m at zen.co.uk
Sat Oct 20 12:55:55 CEST 2007
On Thu, 2007-10-18 at 12:56 +0200, Sebastian Dröge wrote:
> Another problem is, that GOnce is GLib 2.14 stuff and thus can't be used
> unless we update the requirements to that version which wasn't done in
> the past already because of backward compatibility reasons.
The new g_once_init_enter() is GLib-2.14 stuff, but GOnce/g_once() have
been around since GLib-2.4, so no problem there.
> Also GST_BOILERPLATE should probably be changed too then, no idea...
Not sure either. Even if it may be the correct thing to do, I vaguely
remember us deciding against that at some point, but I might be wrong.
As far as I can see, it's not required for elements in plugins (since
_load_plugin() will serialise access and do a class_ref), and doesn't
really help in the case where elements are created via g_object_new()
directly, since there's still raciness within GObject on class creation.
Maybe it would be enough to just document the issue with the special use
case of elements without plugins in the macro documentation.
More information about the gstreamer-devel