Skip to content

Instantly share code, notes, and snippets.

@AlexDaniel
Created December 4, 2016 00:24
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/44e5cde676dc6fdd340fd76fe04b9c1d to your computer and use it in GitHub Desktop.
Save AlexDaniel/44e5cde676dc6fdd340fd76fe04b9c1d to your computer and use it in GitHub Desktop.
Another rakudo issue
#!/usr/bin/env perl6
my $out = Channel.new;
#my $proc = Proc::Async.new(‘perl6’, ‘-e’, ‘sleep ∞’); # this works
my $proc = Proc::Async.new(‘perl6’, ‘-e’, ‘.say for 0..0x1FFFF’); # ← this doesn't
$proc.stdout.tap({ $out.send: 1 });
my $promise = $proc.start;
say ‘let's await ’, now;
await Promise.anyof(Promise.in(1), $promise);
say ‘let's close ’, now;
$proc.kill;
await $promise;
$out.close;
say ‘that's it ’, now;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment