[glib/glib-2-52] gmain: Document threading properties of g_source_is_destroyed()
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/glib-2-52] gmain: Document threading properties of g_source_is_destroyed()
- Date: Sat, 8 Apr 2017 05:48:39 +0000 (UTC)
commit e6dddc3636d278608d3c36f4ab2345efa36b75e9
Author: Philip Withnall <withnall endlessm com>
Date: Sun Feb 5 16:40:33 2017 +0100
gmain: Document threading properties of g_source_is_destroyed()
https://bugzilla.gnome.org/show_bug.cgi?id=778049
glib/gmain.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/glib/gmain.c b/glib/gmain.c
index 5aea34f..7d23d7c 100644
--- a/glib/gmain.c
+++ b/glib/gmain.c
@@ -3063,6 +3063,12 @@ g_main_current_source (void)
* }
* ]|
*
+ * Calls to this function from a thread other than the one acquired by the
+ * #GMainContext the #GSource is attached to are typically redundant, as the
+ * source could be destroyed immediately after this function returns. However,
+ * once a source is destroyed it cannot be un-destroyed, so this function can be
+ * used for opportunistic checks from any thread.
+ *
* Returns: %TRUE if the source has been destroyed
*
* Since: 2.12
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]