开发者

how to synchronise data with JNI in android

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜