Created
October 31, 2016 14:47
-
-
Save jnthn/5f7801deffdfc0084a003e957423312c 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
sub processor($in) { | |
supply { | |
whenever $in { | |
die "oh no"; | |
} | |
} | |
} | |
sub refuses() { | |
my $fake-in = Supplier.new; | |
processor($fake-in.Supply).tap: | |
-> $request { | |
die "oops 1"; | |
}, | |
quit => -> $exception { | |
say "ok"; | |
return; | |
}; | |
$fake-in.emit("XXX"); | |
die "oops 2"; | |
} | |
for ^200 { | |
refuses; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment