Vendor dependencies for 0.3.0 release

This commit is contained in:
2025-09-27 10:29:08 -05:00
parent 0c8d39d483
commit 82ab7f317b
26803 changed files with 16134934 additions and 0 deletions

19
vendor/jni/tests/threads_detach.rs vendored Normal file
View File

@@ -0,0 +1,19 @@
#![cfg(feature = "invocation")]
use std::thread::spawn;
mod util;
use util::{attach_current_thread_permanently, call_java_abs, jvm};
#[test]
fn thread_detaches_when_finished() {
let thread = spawn(|| {
let mut env = attach_current_thread_permanently();
let val = call_java_abs(&mut env, -2);
assert_eq!(val, 2);
assert_eq!(jvm().threads_attached(), 1);
});
thread.join().unwrap();
assert_eq!(jvm().threads_attached(), 0);
}