Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged output of Proc::Async does not work (whenever $proc { … }) #6397

Closed
p6rt opened this issue Jul 18, 2017 · 4 comments
Closed

Merged output of Proc::Async does not work (whenever $proc { … }) #6397

p6rt opened this issue Jul 18, 2017 · 4 comments

Comments

@p6rt
Copy link

p6rt commented Jul 18, 2017

Migrated from rt.perl.org#131763 (status was 'resolved')

Searchable as RT131763$

@p6rt
Copy link
Author

p6rt commented Jul 18, 2017

From @AlexDaniel

Code​:

sub get-output() {
  my $proc = Proc​::Async.new​: â��echoâ��, â��testâ��;
  react {
  #whenever $proc.stdout { } # â��â�� these work
  #whenever $proc.stderr { } #
  whenever $proc { } # â�� this doesn't
  whenever $proc.start { }
  }
  say $++;
}

loop { get-output }

The result depends on your luck. Sometimes it gets stuck on the second execution, sometimes it manages to do it over 20 times and then gets stuck.

According to this it is supposed to work​: https://irclog.perlgeek.de/perl6-dev/2017-07-12#i_14862898

I don't know if there's any trap I'm getting into, or if it's just a bug. Anyway, I hope a ticket won't hurt.

@p6rt
Copy link
Author

p6rt commented Oct 12, 2017

From @AlexDaniel

Alright! This was fixed.

Bisectable points at the merge of “better-sched” branch, which happen right after 2017.09 release. See rakudo/rakudo@61a77e6

Zoffix++ found some tests​: Raku/roast@ae3eea8

However, these tests are not enough to resolve this ticket. We'd need a stress test that does it in a loop several times, just like it is described in the OP.

In any case, this is no longer ANNOYING and is simply TESTNEEDED.

On 2017-07-17 21​:34​:25, alex.jakimenko@​gmail.com wrote​:

Code​:

sub get-output() {
my $proc = Proc​::Async.new​: ‘echo’, ‘test’;
react {
#whenever $proc.stdout { } # ←â�� these work
#whenever $proc.stderr { } #
whenever $proc { } # ← this doesn't
whenever $proc.start { }
}
say $++;
}

loop { get-output }

The result depends on your luck. Sometimes it gets stuck on the second
execution, sometimes it manages to do it over 20 times and then gets
stuck.

According to this it is supposed to work​:
https://irclog.perlgeek.de/perl6-dev/2017-07-12#i_14862898

I don't know if there's any trap I'm getting into, or if it's just a
bug. Anyway, I hope a ticket won't hurt.

@p6rt
Copy link
Author

p6rt commented Oct 12, 2017

From @zoffixznet

Stresstests in Raku/roast@e821843

@p6rt
Copy link
Author

p6rt commented Oct 12, 2017

@zoffixznet - Status changed from 'new' to 'resolved'

@p6rt p6rt closed this as completed Oct 12, 2017
@p6rt p6rt added the testneeded label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant