-
-
Save jnthn/2a350ca7d9770ab5bd8019129428e393 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 $s1 = supply { | |
whenever Promise.in(1) { | |
die "oops"; | |
} | |
} | |
my $s2 = supply { | |
whenever Supply.interval(0.5).head(5) { | |
.emit; | |
} | |
} | |
my $ex; | |
react { | |
whenever $s1 { | |
QUIT { | |
default { | |
say "caught"; | |
$ex //= $_; | |
} | |
} | |
} | |
whenever $s2 { .say } | |
} | |
$ex.?rethrow; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment