Skip to content

Commit 52184d5

Browse files
committed
restore s_detach_jvm_from_thread)
1 parent 0ce0bc9 commit 52184d5

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/native/crt.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,14 @@ void aws_jni_set_dispatch_queue_threads(bool is_dispatch_queue) {
6464
}
6565

6666
static void s_detach_jvm_from_thread(void *user_data) {
67+
AWS_LOGF_DEBUG(AWS_LS_COMMON_GENERAL, "s_detach_jvm_from_thread invoked");
6768
JavaVM *jvm = user_data;
6869

6970
/* we don't need this JNIEnv, but this is an easy way to verify the JVM is still valid to use */
7071
/********** JNI ENV ACQUIRE **********/
7172
JNIEnv *env = aws_jni_acquire_thread_env(jvm);
7273
if (env != NULL) {
74+
(*jvm)->DetachCurrentThread(jvm);
7375
aws_jni_release_thread_env(jvm, env);
7476
/********** JNI ENV RELEASE **********/
7577
}

0 commit comments

Comments
 (0)