RFR: 8244936: Reduce JNI overhead of accessing FileDescriptor

Alan Bateman Alan.Bateman at oracle.com
Mon May 18 09:11:21 UTC 2020


On 18/05/2020 09:59, Peter Levart wrote:
> :
>
> Please elaborate. Do you have an example of such use case? Are there 
> any existing races possible?
Everywhere that closes a file descriptor needs to coordinate the closing 
with threads that may be accessing that file descriptor, otherwise you 
risk doing I/O on file descriptors that have been recycled. This has 
always been problematic for the legacy java.io classes, so the concern 
is that increasing the window where you are using the "raw" file 
descriptor will make it worse.

-Alan.


More information about the core-libs-dev mailing list