Native methods and virtual threads

Brian S O'Neill bronee at gmail.com
Fri Jul 14 13:35:37 UTC 2023


In my particular case, I would link the file I/O methods twice. One with 
the "is blocking" option and one without. Depending on how the file is 
opened, I know whether or not blocking is expected and can invoke the 
appropriate method.

The "a byte at a time" case is not something that I'd worry about, 
considering that the advice has always been to use buffered I/O streams 
when accessing files in tiny chunks. Has the extra overhead been 
measured with respect to the overhead of making a system call? On 
different operating systems?


On 2023-07-14 05:54 AM, Alan Bateman wrote:
> On 14/07/2023 13:39, Robert Engels wrote:
>> Why do you say that Blocker usage is non optimal. I think that when 
>> the common IO operations are VT “reworked” the remaining cases being 
>> handled by Blocker seems simple and reasonable.
> Right now, it adds a bit of overhead and some contention, but mostly 
> this is only an issue when doing very short lived operations, like 
> reading a file a byte at a time and the file is already in the file 
> system cache.
> 
> -Alan


More information about the panama-dev mailing list