On 2020-05-18 11:11, Alan Bateman wrote:
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.

The pushed fix gets half the potential gain while possibly narrowing the
window, so seemed like an obvious and quick win for speed without
hurting reliability.

Getting to the other half of the potential gain would of course be
great, but proving it is (or can be made) safe might be a challenge.
Alan has asked me not to pursue this right now since there's a lot of
history to dig up here, and much of it might not be available in the
open.

/Claes

Reply via email to