Skip to content

Instantly share code, notes, and snippets.

@zoffixznet
Created August 18, 2016 17:05
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 zoffixznet/096ce71e863a62fc2e4c37138ed4779f to your computer and use it in GitHub Desktop.
Save zoffixznet/096ce71e863a62fc2e4c37138ed4779f to your computer and use it in GitHub Desktop.
# $ perl6 foo.pl
# ^CUnhandled exception in code scheduled on thread 4
# X::Interrupt exception produced no message
# in block at foo.pl line 4
try {
my $p = start {
signal(SIGINT).tap: {
class X::Interrupt is Exception {}.new.throw;
}
loop {}
}
await Promise.allof($p);
say $p.result.^name;
}
loop {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment