[glib] Bug 587300 - g_cancellable_disconnect deadlock
- From: Ryan Lortie <ryanl src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [glib] Bug 587300 - g_cancellable_disconnect deadlock
- Date: Thu, 12 Nov 2009 04:55:52 +0000 (UTC)
commit 6b7b7a76020e76370e416d794eceb99937b9ed33
Author: Ryan Lortie <desrt desrt ca>
Date: Wed Nov 11 23:48:06 2009 -0500
Bug 587300 - g_cancellable_disconnect deadlock
add documentation to clarify that a deadlock is the expected case for
calling this function from a signal handler
gio/gcancellable.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/gio/gcancellable.c b/gio/gcancellable.c
index 36973ad..5f80022 100644
--- a/gio/gcancellable.c
+++ b/gio/gcancellable.c
@@ -707,9 +707,12 @@ g_cancellable_connect (GCancellable *cancellable,
* @cancellable: A #GCancellable or %NULL.
* @handler_id: Handler id of the handler to be disconnected, or %0.
*
- * Disconnects a handler from an cancellable instance similar to
- * g_signal_handler_disconnect() but ensures that once this
- * function returns the handler will not run anymore in any thread.
+ * Disconnects a handler from a cancellable instance similar to
+ * g_signal_handler_disconnect(). Additionally, in the event that a
+ * signal handler is currently running, this call will block until the
+ * handler has finished. Calling this function from a
+ * #GCancellable::cancelled signal handler will therefore result in a
+ * deadlock.
*
* This avoids a race condition where a thread cancels at the
* same time as the cancellable operation is finished and the
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]