How do i implement synchronized blocks in my C/C++ JNI code?

Davanum Srinivas

The equivalent for

synchronized (obj) {
    ...                   /* synchronized block */
}

is as follows:

(*env)->MonitorEnter(obj);
...                      /* synchronized block */
(*env)->MonitorExit(obj);
0 Comments  (click to add your comment)
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact