How to sync data with JNI in android

I need to synchronize a structure to be populated with native code (C code), and the same will be read from Java code with JNI. I need to sync them. Is there any method I should use, something like IPC mechanisms?

+3
source share
1 answer

You can use JNIEnv to get a monitor for a Java object, and to do this, use regular Java synchronization for synchronization. Read more about recording and monitor output here.

+1
source

Source: https://habr.com/ru/post/1791611/


All Articles