[glib: 1/2] giotypes: Document refcounting of source object for GAsyncReadyCallback




commit f5dc0ec489e9ee8732f50937765aa8877a67c708
Author: Philip Withnall <pwithnall endlessos org>
Date:   Fri Mar 12 12:44:57 2021 +0000

    giotypes: Document refcounting of source object for GAsyncReadyCallback
    
    Signed-off-by: Philip Withnall <pwithnall endlessos org>
    
    Fixes: #2343

 gio/giotypes.h | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/gio/giotypes.h b/gio/giotypes.h
index 995c9cb15..da6a10a4b 100644
--- a/gio/giotypes.h
+++ b/gio/giotypes.h
@@ -271,6 +271,10 @@ typedef struct _GVolumeMonitor                GVolumeMonitor;
  * where the #GTask was created. All other users of
  * #GAsyncReadyCallback must likewise call it asynchronously in a
  * later iteration of the main context.
+ *
+ * The asynchronous operation is guaranteed to have held a reference to
+ * @source_object from the time when the `*_async()` function was called, until
+ * after this callback returns.
  **/
 typedef void (*GAsyncReadyCallback) (GObject *source_object,
                                     GAsyncResult *res,


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