Thread overview
[Issue 20373] Line counter with async Buffer
Nov 08, 2019
Vladimir Panteleev
Nov 08, 2019
bioinfornatics
Nov 08, 2019
Vladimir Panteleev
Nov 08, 2019
bioinfornatics
Nov 08, 2019
Vladimir Panteleev
November 08, 2019
https://issues.dlang.org/show_bug.cgi?id=20373

Vladimir Panteleev <dlang-bugzilla@thecybershadow.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dlang-bugzilla@thecybershad
                   |                            |ow.net

--- Comment #1 from Vladimir Panteleev <dlang-bugzilla@thecybershadow.net> ---
>     auto asyncReader = taskPool.asyncBuf((ref ubyte[] buf) => file.rawRead(buf),

I think this should be:

>     auto asyncReader = taskPool.asyncBuf((ref ubyte[] buf) { buf = file.rawRead(buf); },

See https://dlang.org/library/std/stdio/file.raw_read.html

--
November 08, 2019
https://issues.dlang.org/show_bug.cgi?id=20373

bioinfornatics <bioinfornatics@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #2 from bioinfornatics <bioinfornatics@gmail.com> ---
Thanks Vladimir

Indeed this fix imply a correct number of line counted.
It is still much slower than wc but it works


thanks

--
November 08, 2019
https://issues.dlang.org/show_bug.cgi?id=20373

Vladimir Panteleev <dlang-bugzilla@thecybershadow.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|FIXED                       |INVALID

--- Comment #3 from Vladimir Panteleev <dlang-bugzilla@thecybershadow.net> ---
Marking as invalid as there is no bug in any D components.

--
November 08, 2019
https://issues.dlang.org/show_bug.cgi?id=20373

--- Comment #4 from bioinfornatics <bioinfornatics@gmail.com> ---
ok Vladimir, maybe to provide documentation more clear?

--
November 08, 2019
https://issues.dlang.org/show_bug.cgi?id=20373

--- Comment #5 from Vladimir Panteleev <dlang-bugzilla@thecybershadow.net> ---
The documentation looks good to me as it is, but if you can think of some way to improve it that would have avoided this mistake, please do submit a pull request.

--