Why doesn't NIO provide an async-singlethreaded I/O?
Brunoais
brunoaiss at gmail.com
Fri Oct 28 07:54:00 UTC 2016
Please read the quotes.
They are from the thread "Re: Request/discussion: BufferedReader reading
using async API while providing sync API" from the mailing list
core-libs-dev at openjdk.java.net .
The main question I have can be summarized to:
Why isn't there (or was there) any non-block read-ahead I/O in java's
NIO (more question information in the quotes)?
Thanks in advance.
On 27/10/2016 23:59, David Holmes wrote:
> Sorry nio-dev ...
>
> On 28/10/2016 7:09 AM, David Holmes wrote:
>> You might try discussing on net-dev rather than core-libs-dev, to get
>> additional historical info related to the io and nio file APIs.
>>
>> David
>>
>> On 28/10/2016 5:08 AM, Brunoais wrote:
>>> You are right. Even in windows it does not set the flags for async
>>> reads. It seems like it is windows itself that does the decision to
>>> buffer the contents based on its own heuristics.
>>>
>>> But... Why? Why won't it be? Why is there no API for it? How am I
>>> getting 100% HDD use and faster times when I fake work to delay getting
>>> more data and I only have a fluctuating 60-90% (always going up and
>>> down) when I use an InputStream?
>>> Is it related to how both classes cache and how frequently and how much
>>> each one asks for data?
>>>
>>> I really would prefer not having to read the source code because it
>>> takes a real long time T.T.
>>>
>>> I end up reinstating... And wondering...
>>>
>>> Why doesn't java provide a single-threaded non-block API for file reads
>>> for all OS that support it? I simply cannot find that information no
>>> matter how much I search on google, bing, duck duck go... Can any of
>>> you
>>> point me to whomever knows?
>>>
More information about the nio-dev
mailing list