FileDescriptor.sync isn't using Blocker

Brian S O'Neill bronee at gmail.com
Thu Jul 13 14:28:20 UTC 2023


An application which relies on a non-virtual thread pool can spin up 
more platform threads to compensate, and so a sync isn't necessarily an 
issue. Virtual threads limit the amount of carrier threads they depend 
on, and so a virtual thread stuck on a sync can prevent other virtual 
threads from making progress. The internal Blocker class is intended to 
help compensate for this behavior.

On 2023-07-13 07:13 AM, Robert Engels wrote:
> It is no worse than the current behavior. If it was a platform thread it would block. The virtual threads carrier thread blocks and a new carrier is spawned. So this would only be a performance optimization not a regression against current performance.


More information about the loom-dev mailing list