mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-30 20:33:08 +02:00
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
This commit is contained in:
parent
85e9455f68
commit
f2f66bfe45
@ -523,7 +523,12 @@ install_property_internal (GType g_type,
|
|||||||
* @property_id: the id for the new property
|
* @property_id: the id for the new property
|
||||||
* @pspec: the #GParamSpec 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,
|
* 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,
|
* 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
|
* @pspecs: (array length=n_pspecs): the #GParamSpecs array
|
||||||
* defining the new properties
|
* defining the new properties
|
||||||
*
|
*
|
||||||
* Installs new properties from an array of #GParamSpecs. This is
|
* Installs new properties from an array of #GParamSpecs.
|
||||||
* usually done in the class initializer.
|
*
|
||||||
|
* 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 property id of each property is the index of each #GParamSpec in
|
||||||
* the @pspecs array.
|
* the @pspecs array.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user