Using an async buffer

bioinfornatics bioinfornatics at fedoraproject.org
Fri Nov 8 14:32:25 UTC 2019


On Friday, 8 November 2019 at 08:58:36 UTC, bioinfornatics wrote:
>> the error message was understandable to me,
>
> ... the error message was not understandable to me ...

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

as example I change the code in order to shuffle line content to 
get the ability to locate the bug

Real last lines are:
1
190121746114132251381321230342516302196252336238211523943272873744285119323293314107
316322221221132661353262123081115418570291330356278322215013742329426
714213310231111593822146521912312869120169289362332157427352432313112226373403123825
6812101511112462691294263101232
90182312212511430133514352114282271133753782360462351124233948222161956731321
11822481725231121323330910521376234322119392811262411335432102108273
463633112212153255811679207


while the code give:
1
190121746114132251381321230342516302196252336238211523943272873744285119323293314107
316322221221132661353262123081115418570291330356278322215013742329426
714213310231111593822146521912312869120169289362332157427352432313112226373403123825
6812101511112462691294263101232
90182312212511430133514352114282271133753782360462351124233948222161956731321
11822481725231121323330910521376234322119392811262411335432102108273
4636331122121532558116792071512
1553203330299234738282167126033321272154232912111312416461868182323242
111932223509162312223104310231321116573254736811479599513441112318312221230321154
11363210249282132717260536372386522748224512596323581311
121932131303243861212327470532121636029110222323531121763
2499315312114672213683218207122451351984311032612832096363463812
....

I think we see the buffer content which is reused. so A big part 
of last read come from the previous chunk



More information about the Digitalmars-d-learn mailing list