[perl #129882] [TESTNEEDED] [CONC] [IO] Proc with `.in.close` and `.out.slurp-rest` in different threads, hangs <[email protected]>

[email protected] ("Aleks-Daniel Jakimenko-Aleksejev via RT")
Newsgroups perl.perl6.compiler
Message-ID <[email protected]>
Test in
https://github.com/perl6/roast/commit/195227f779f7441de1678e12941550271da799b2

On 2017-07-09 19:40:57, [email protected] wrote:
> That's pretty good. But issues are not closed without tests, unless
> there's a
> good reason not to add a test. No reason was mentioned, therefore
> reopening
> this with “testneeded” tag.
>
> On 2017-07-09 15:49:46, [email protected] wrote:
> > On Wed, 19 Oct 2016 05:57:04 -0700, [email protected] wrote:
> > > On Fri Oct 14 16:40:27 2016, [email protected] wrote:
> > > > The following code attempts to pipe a large Blob (larger than a
> > > > pipe's
> > > > buffer size) through an external command.
> > > > However, it hangs on the `.in.close` line and never finishes:
> > > >
> > > > my $proc = run «cat -», :in, :out, :bin;
> > > > my $input = ("a" x 1000000).encode;
> > > > my $promise = start {
> > > > $proc.in.write: $input;
> > > > $proc.in.close;
> > > > }
> > > > say $proc.out.slurp-rest(:close, :bin).bytes;
> > > > await $promise;
> > > >
> > > For now, if using threads, stick with Proc::Async (in the future,
> > > we'll probably re-implement Proc/run etc. in terms of Proc::Async).
> > >
> > > /jnthn
> >
> > jnthn recently made the above mentioned re-implementation so the code
> > shown in the report now works.
> >
> > Closing issue
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.