-
-
Save AlexDaniel/4a5f0c17e32307f59e41a59c18cc54c0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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