-
-
Save smls/75518c746ca65b3287482c491971eac0 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
my $proc = run «cat -», :in, :out, :bin; | |
say "started"; | |
my $input = ("a" x 1000000).encode; | |
say "input encoded"; | |
my $promise = start { | |
$proc.in.write: $input; | |
say "input written"; | |
$proc.in.close; | |
say "input closed"; | |
} | |
say $proc.out.slurp-rest(:close, :bin).bytes; | |
say "output read"; | |
await $promise; | |
say "all done"; |
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
started | |
input encoded | |
input written |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment