Attaches the current thread to an active JavaVM and instructs that the Jvm will detach the Java JVM from the thread when the rust Jvm is dropped. This is useful when creating a Jvm while on a Thread that is created in the Java world. When this Jvm is dropped, we don't want to detach the thread from the Java VM.
()
| 113 | /// This is useful when creating a Jvm while on a Thread that is created in the Java world. |
| 114 | /// When this Jvm is dropped, we don't want to detach the thread from the Java VM. |
| 115 | pub fn attach_thread_with_no_detach_on_drop() -> errors::Result<Jvm> { |
| 116 | let mut jvm = Jvm::attach_thread()?; |
| 117 | jvm.detach_thread_on_drop(false); |
| 118 | Ok(jvm) |
| 119 | } |
| 120 | |
| 121 | /// If false, the thread will not be detached when the Jvm is being dropped. |
| 122 | /// This is useful when creating a Jvm while on a Thread that is created in the Java world. |
nothing calls this directly
no test coverage detected