Using an async buffer

bioinfornatics bioinfornatics at fedoraproject.org
Fri Nov 8 16:41:58 UTC 2019


On Friday, 8 November 2019 at 14:32:25 UTC, bioinfornatics wrote:
> On Friday, 8 November 2019 at 08:58:36 UTC, bioinfornatics 
> wrote:
>> [...]
>
> I do not have found yet why the line counter is false.
> I can tell if the amount to read imply that the last read is 
> not not strictly equal to the buffer then the result is false 
> as if it left less thing to read the result is not shorter than 
> requested buffer size as it is told into the documentation:
> https://dlang.org/phobos/std_stdio.html#.File.rawRead
>
> [...]


Updating the code with: (ref ubyte[] buffer){ buffer = 
file.rawRead(buffer); }

fix the problem.



More information about the Digitalmars-d-learn mailing list