[java-atk-wrapper: 1/2] Make jaw thread a daemon thread
- From: Samuel Thibault <sthibaul src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [java-atk-wrapper: 1/2] Make jaw thread a daemon thread
- Date: Wed, 1 May 2019 22:29:18 +0000 (UTC)
commit 0b843c80e83e08aacb8b27711823553f6600da2c
Author: Samuel Thibault <samuel thibault ens-lyon org>
Date: Tue Apr 2 00:08:27 2019 +0200
Make jaw thread a daemon thread
So that if all non-daemon threads exit, the application exits, and not
remain stuck on the jaw thread still running.
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=775947
jni/src/jawutil.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/jni/src/jawutil.c b/jni/src/jawutil.c
index 48974f0..0c25101 100644
--- a/jni/src/jawutil.c
+++ b/jni/src/jawutil.c
@@ -356,7 +356,7 @@ jaw_util_get_jni_env(void)
case JNI_EDETACHED:
args.version = JNI_VERSION_1_6;
args.name = g_strdup_printf("NativeThread %d", i++);
- res = (*cachedJVM)->AttachCurrentThread(cachedJVM, &ptr, NULL);
+ res = (*cachedJVM)->AttachCurrentThreadAsDaemon(cachedJVM, &ptr, NULL);
env = (JNIEnv*) ptr;
if ((res == JNI_OK) && (env != NULL))
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]