[crac] RFR: Handle open file descriptors with configurable policies [v9]
Radim Vansa
rvansa at openjdk.org
Mon Jul 17 08:52:47 UTC 2023
On Tue, 4 Jul 2023 16:53:13 GMT, Anton Kozlov <akozlov at openjdk.org> wrote:
> Thank you for the link. Does that mean that NIO does not reset FD just because that is not necessary?
I think so. It looks like a bit of stretch to me (writing a non-volatile field is not that costly) but I would think that someone did a benchmark and observed a difference.
> And could you elaborate on why we don't want the extra test for the mark?
To put it a bit into perspective, I have used the marking when only FileDescriptor's JDKResource was involved - one extra mark that would be set and read only by the resource seemed simple enough to do the job without changing the other code paths. But if the JDKSocketResource needs to break the encapsulation and check if (an independent) FD's resource has a mark set in order to treat it differently, the complexity builds up and isn't really worth of skipping the single field write.
-------------
PR Review Comment: https://git.openjdk.org/crac/pull/69#discussion_r1265057440
More information about the crac-dev
mailing list