[balsa/gtk3] Warn when locking a subthread
- From: Peter Bloomfield <PeterB src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [balsa/gtk3] Warn when locking a subthread
- Date: Fri, 8 Jun 2012 01:43:31 +0000 (UTC)
commit 82f0d6822a2f7eded61986f18df6219bb2f3787d
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date: Thu Jun 7 19:03:46 2012 -0400
Warn when locking a subthread
* libbalsa/libbalsa.c (libbalsa_threads_enter): warn when
locking a subthread, to help find bad code paths.
ChangeLog | 5 +++++
libbalsa/libbalsa.c | 3 +++
2 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 3550235..a8b005d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2012-06-07 Peter Bloomfield
+ * libbalsa/libbalsa.c (libbalsa_threads_enter): warn when
+ locking a subthread, to help find bad code paths.
+
+2012-06-07 Peter Bloomfield
+
* src/main-window.c: check for NULL index.
2012-06-07 Peter Bloomfield
diff --git a/libbalsa/libbalsa.c b/libbalsa/libbalsa.c
index 9c5aec3..c81ac13 100644
--- a/libbalsa/libbalsa.c
+++ b/libbalsa/libbalsa.c
@@ -758,6 +758,9 @@ libbalsa_threads_enter(void)
self = pthread_self();
+ if (libbalsa_am_i_subthread())
+ g_warning("Locking a subthread");
+
if (self != libbalsa_threads_id) {
pthread_mutex_lock(&libbalsa_threads_mutex);
libbalsa_threads_id = self;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]