tags:

views:

67

answers:

1
+1  A: 

I would suggest doing all the synchronization in one language or the other. It's looking like "volatile" isn't being respected across the boundary for some reason. Something like:

public doJob()
{
  while(!isTerminated)
    executeNative();
}
Karl Bielefeldt
So did i. Code a bit more complicated, but idea the same. It works, of course...The thing is - i still don't understand how this problem appeared and where i can find some standard docs where JNI behavior is described in detail...
ALOR
This is likely a bug with the implementation rather than specified behavior. It may work fine on another operating system, for example. You'd probably have to look at the source code to see how it works.
Karl Bielefeldt