FileDescriptor.sync isn't using Blocker

Alan Bateman Alan.Bateman at oracle.com
Wed Jul 12 16:58:06 UTC 2023


On 02/07/2023 00:30, Brian S O'Neill wrote:
> I noticed that FileChannelImpl.force calls Blocker.begin in order to 
> be virtual thread friendly, but I don't see a corresponding call in 
> FileDescriptor.sync. Is it not necessary or was it just missed?

No reason, it could do the same, it's mostly that only the very old APIs 
that provide a way to get their FileDescriptor. Have you encountered 
something that may potentially run in a virtual thread that uses this or 
was it as you say, just noticed it.

-Alan


More information about the loom-dev mailing list