JNI calls that don't return

David P Grove groved at us.ibm.com
Wed Mar 8 13:00:42 UTC 2006

The historical reasons why Jikes RVM uses green threads aren't that 
relevant to this list, so I'll just direct any one who cares to recent 
discussion on the Jikes RVM core list.  Personally, I think Jikes RVM 
should be moving to native threading mainly to make it easier to run apps 
with native code that assumes native threading, but that's not relevant to 
your question.

> Maybe you know something I don't.  Is there any wordage in the JNI
> spec that forbids blocking calls, or suggests that this might be
> problematic?  Is there any wordage in the JNI spec that allows the
> Jikes RVM to behave in the way that it does with repect to blocking
> calls?

The JNI spec 8.1.5 basically says that if you are writing native code, and 
your native code assumes a threading model that is different from the one 
used by the JVM then you shouldn't expect your application/native code to 
operate correctly.  It discusses green threads explicitly. So, the spec 
allows this, but notes (correctly) that most complex native code in the 
world is unlikely to work when run on a JVM that uses green threads. 


More information about the Classpath mailing list