Skip to content

Instantly share code, notes, and snippets.

@AlexDaniel
Last active July 18, 2017 04:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AlexDaniel/4a5f0c17e32307f59e41a59c18cc54c0 to your computer and use it in GitHub Desktop.
Save AlexDaniel/4a5f0c17e32307f59e41a59c18cc54c0 to your computer and use it in GitHub Desktop.
#!/usr/bin/env perl6
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 }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment