MCPcopy Create free account
hub / github.com/astonbitecode/j4rs / set_thread_local_env

Function set_thread_local_env

rust/src/cache.rs:384–389  ·  view source on GitHub ↗
(jni_env_opt: Option<*mut JNIEnv>)

Source from the content-addressed store, hash-verified

382}
383
384pub(crate) fn set_thread_local_env(jni_env_opt: Option<*mut JNIEnv>) {
385 debug("Called set_thread_local_env");
386 JNI_ENV.with(|existing_jni_env_opt| {
387 *existing_jni_env_opt.borrow_mut() = jni_env_opt;
388 });
389}
390
391pub(crate) fn get_thread_local_env() -> errors::Result<*mut JNIEnv> {
392 match get_thread_local_env_opt() {

Callers 2

try_fromMethod · 0.85
dropMethod · 0.85

Calls 1

debugFunction · 0.85

Tested by

no test coverage detected