Closed sirodeneko closed 2 years ago
The Jvm
cannot be sent between threads because it contains JNI components that also cannot be sent between threads.
All you need to do, is to attach
the current thread to the Jvm, using:
let jvm: Jvm = Jvm::attach_thread().unwrap();
3Q
I have a structure, then I will instantiate a unique one of it and pass it to sync to call the java method。
but,compilation has failed.
because I have to implement the 'Send' trait。 I don't know how to implement it safely。