Thread overview
[Issue 20373] Line counter with async Buffer
4 days ago
bioinfornatics
4 days ago
bioinfornatics
4 days ago
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

--
4 days ago
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

--
4 days ago
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.

--
4 days ago
https://issues.dlang.org/show_bug.cgi?id=20373

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

--
4 days ago
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.

--