Commit f2f66bfe authored by Allison Karlitskaya's avatar Allison Karlitskaya
Browse files

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
parent 85e9455f
......@@ -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.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment