[glib] gobject: Document notify signal deduplication with freeze/thaw



commit f642209ef4c7f13f5ff03ca3c315cd237f8f26bb
Author: Philip Withnall <philip tecnocode co uk>
Date:   Sun May 27 22:40:44 2012 +0100

    gobject: Document notify signal deduplication with freeze/thaw
    
    Expand the documentation for g_object_[freeze|thaw]_notify() to explain that
    it deduplicates ânotifyâ signals emitted by frozen objects, so that at most
    one signal is emitted per property.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=676937

 gobject/gobject.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/gobject/gobject.c b/gobject/gobject.c
index a18cb75..9c4ca63 100644
--- a/gobject/gobject.c
+++ b/gobject/gobject.c
@@ -1070,7 +1070,9 @@ g_object_run_dispose (GObject *object)
  * Increases the freeze count on @object. If the freeze count is
  * non-zero, the emission of "notify" signals on @object is
  * stopped. The signals are queued until the freeze count is decreased
- * to zero.
+ * to zero. Duplicate notifications are squashed so that at most one
+ * #GObject::notify signal is emitted for each property modified while the
+ * object is frozen.
  *
  * This is necessary for accessors that modify multiple properties to prevent
  * premature notification while the object is still being modified.
@@ -1241,7 +1243,10 @@ g_object_notify_by_pspec (GObject    *object,
  *
  * Reverts the effect of a previous call to
  * g_object_freeze_notify(). The freeze count is decreased on @object
- * and when it reaches zero, all queued "notify" signals are emitted.
+ * and when it reaches zero, queued "notify" signals are emitted.
+ *
+ * Duplicate notifications for each property are squashed so that at most one
+ * #GObject::notify signal is emitted for each property.
  *
  * It is an error to call this function when the freeze count is zero.
  */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]