invocation interface

Jeff Sturm jsturm@one-point.com
Wed May 16 09:06:00 GMT 2001


On 2001年5月16日, Cedric Berger wrote:
> > How is this done with JNI? The Sun JNI docs say DestroyJavaVM must not
> > be called until all non-main threads have terminated.
>> Where did you get that?

I'm looking at
http://java.sun.com/j2se/1.3/docs/guide/jni/spec/invocation.doc.html#16089
"Only the main thread can unload the VM. The main thread must be the
only remaining user thread when it calls DestroyJavaVM()."
> Here is the relevent part of the doc:
>> jint DestroyJavaVM(JavaVM *vm)
>> The support for DestroyJavaVM was not complete in 1.1. Only the main thread may call DestroyJavaVM. In the Java 2 SDK, any thread,
> whether attached or not, can call this function. If the current thread is attached, the VM waits until the current thread is the
> only user-level Java thread. If the current thread is not attached, the VM attaches the current thread and then waits until the
> current thread is the only user-level thread. The Java 2 SDK still does not support VM unloading, however. DestroyJavaVM always
> returns an error code.

Hmm... that sounds more like our _Jv_ThreadWait. I wasn't aware that Sun
changed this part of the spec.
Jeff


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /