From f2f66bfe45f41d18e7437341e5ebf4c70d815958 Mon Sep 17 00:00:00 2001 From: Ryan Lortie Date: Fri, 6 Jun 2014 16:42:23 -0400 Subject: docs: warn about installing properties after init Leave ourselves a little wiggle room: if people install properties after initialisation then we reserve the right to handle that in a way that may not be threadsafe. https://bugzilla.gnome.org/show_bug.cgi?id=698614 --- gobject/gobject.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/gobject/gobject.c b/gobject/gobject.c index fe081abb0..a3d107e3d 100644 --- a/gobject/gobject.c +++ b/gobject/gobject.c @@ -523,7 +523,12 @@ install_property_internal (GType g_type, * @property_id: the id for the new property * @pspec: the #GParamSpec for the new property * - * Installs a new property. This is usually done in the class initializer. + * Installs a new property. + * + * All properties should be installed during the class initializer. It + * is possible to install properties after that, but doing so is not + * recommend, and specifically, is not guaranteed to be thread-safe vs. + * use of properties on the same type on other threads. * * Note that it is possible to redefine a property in a derived class, * by installing a property with the same name. This can be useful at times, @@ -574,8 +579,12 @@ g_object_class_install_property (GObjectClass *class, * @pspecs: (array length=n_pspecs): the #GParamSpecs array * defining the new properties * - * Installs new properties from an array of #GParamSpecs. This is - * usually done in the class initializer. + * Installs new properties from an array of #GParamSpecs. + * + * All properties should be installed during the class initializer. It + * is possible to install properties after that, but doing so is not + * recommend, and specifically, is not guaranteed to be thread-safe vs. + * use of properties on the same type on other threads. * * The property id of each property is the index of each #GParamSpec in * the @pspecs array. -- cgit v1.2.1