diff options
author | Ryan Lortie <desrt@desrt.ca> | 2014-06-06 16:42:23 -0400 |
---|---|---|
committer | Ryan Lortie <desrt@desrt.ca> | 2014-06-06 16:44:47 -0400 |
commit | f2f66bfe45f41d18e7437341e5ebf4c70d815958 (patch) | |
tree | 9fee881b0b859d8606b1dbf02b8a16237379b18b | |
parent | 85e9455f68c6cc6093a1ede1c5f15587bba08b51 (diff) | |
download | glib-f2f66bfe45f41d18e7437341e5ebf4c70d815958.tar.gz |
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
-rw-r--r-- | gobject/gobject.c | 15 |
1 files 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. |