[java-atk-wrapper] AtkWrapper: FIX hang on g_cond thread wait
- From: Magdalen Berns <mberns src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [java-atk-wrapper] AtkWrapper: FIX hang on g_cond thread wait
- Date: Fri, 2 Jan 2015 00:27:43 +0000 (UTC)
commit fa48f1b9494a088f80d399e75103c527c4e7e9ec
Author: Magdalen Berns <m berns thismagpie com>
Date: Fri Jan 2 00:22:12 2015 +0000
AtkWrapper: FIX hang on g_cond thread wait
The g_cond was waiting for an undefined period of time
causing java programs to hang on startup. Also the use of
g_thread_create is deprecated for a long time and use seems to
be incompatible with the g_mutex and g_cond functions.
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=742157
jni/src/AtkWrapper.c | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/jni/src/AtkWrapper.c b/jni/src/AtkWrapper.c
index 48d59d0..559c555 100644
--- a/jni/src/AtkWrapper.c
+++ b/jni/src/AtkWrapper.c
@@ -210,12 +210,10 @@ JNICALL Java_org_GNOME_Accessibility_AtkWrapper_loadAtkBridge(JNIEnv *jniEnv,
// registered before any emission of AWT event.
g_mutex_lock(&atk_bridge_mutex);
- GThread *main_loop_thread = g_thread_create(jni_main_loop,
- (gpointer)main_loop,
- FALSE,
- NULL);
+ GThread *main_loop_thread = g_thread_new("atk_bridge_adaptor_init",
+ jni_main_loop,
+ (gpointer)main_loop);
- g_cond_wait(&atk_bridge_cond, &atk_bridge_mutex);
g_mutex_unlock(&atk_bridge_mutex);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]