You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When turning an IO::Handle into a stream using .Supply, the resulting supply isn't usable when chain with for example .lines or .words.
Expected Behavior
Lines/words are read as they come in.
Actual Behavior
No lines are processed until the entire buffer (64k by default) is filled (or EOF is reached). This can be worked around, by setting the blocksize to 1 byte, but that is highly unintuitive and performs poorly.
What .Supply probably should do instead is read up to$blocksize bytes.
Steps to Reproduce
react { whenever $*IN.Supply.lines { say $_ } }
Environment
Welcome to Rakudo™ v2022.12.
Implementing the Raku® Programming Language v6.d.
Built on MoarVM version 2022.12.
The text was updated successfully, but these errors were encountered:
Leont
added a commit
to Leont/rakudo
that referenced
this issue
Jun 4, 2023
Otherwise it will only emit any data once 64k bytes are read, which
means a construct like $handle.Supply.lines will not DWIM at all.
This fixesrakudo#5189
Leont
linked a pull request
Jun 4, 2023
that will
close
this issue
The Problem
When turning an
IO::Handle
into a stream using.Supply
, the resulting supply isn't usable when chain with for example.lines
or.words
.Expected Behavior
Lines/words are read as they come in.
Actual Behavior
No lines are processed until the entire buffer (64k by default) is filled (or EOF is reached). This can be worked around, by setting the blocksize to 1 byte, but that is highly unintuitive and performs poorly.
What
.Supply
probably should do instead is read up to$blocksize
bytes.Steps to Reproduce
react { whenever $*IN.Supply.lines { say $_ } }
Environment
The text was updated successfully, but these errors were encountered: