classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Proposal for changes to Classpath's JNI libraries


From: Artur Biesiadowski
Subject: Re: Proposal for changes to Classpath's JNI libraries
Date: Mon, 02 Dec 2002 15:37:51 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.2b) Gecko/20021009

Stephen Crawley wrote:


Those of you have been following the Kissme mailing list will know
that we've had a long-standing problem with Kissme garbage collection
and IO.  In a nutshell, the Kissme garbage collector can only run
when all threads are within a "GC point".  Normal Java code regularly
enters (and exits) GC points, and native code will get there eventually.


As far as I understand one of basic concepts behind JNI, idea behind local/global references mess one exactly meant to provide a help for gc. Call to native method can be marked as safe (all call areas have to be fully resolved to allow gc for upper frames). Inside JNI, nothing bad can happen - all references to java objects are managed through JNI itself, which is fully under your control.

Why careful design of JNI layer cannot solve the problem here ?

You cannot expect all people out there to write their JNI libraries wrapping any potentially blocking calls into your calls (I'm talking about third party libraries).

Artur





reply via email to

[Prev in Thread] Current Thread [Next in Thread]