I need to synchronize on a structure, which will be filled in native code(C code) and the开发者_Go百科 same will be read from the Java Code with JNI. I need to synchronize these. Is there any method I should use, something like the IPC mechanisms?
You can use the JNIEnv to acquire the monitor for a Java Object and therefor use the usual Java synchronization to synchronize.. More on the monitor entry and exit here
精彩评论