Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Properly throw exceptions in taps
  • Loading branch information
lizmat committed Apr 18, 2014
1 parent 1b47edb commit 2180049
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/Supply.pm
Expand Up @@ -18,7 +18,7 @@ my role Supply {
has @!tappers;
has $!tappers_lock = Lock.new;

method tap(&more, :&done, :&quit) {
method tap(&more, :&done, :&quit = {.die}) {
my $sub = Tap.new(:&more, :&done, :&quit, :supply(self));
$!tappers_lock.protect({
@!tappers.push($sub);
Expand Down Expand Up @@ -125,7 +125,7 @@ sub on(&setup) {
$source.tap(
-> \val {
$lock.protect({ more(val) });
# CATCH { default { self.quit($_) } }
CATCH { default { self.quit($_) } }
},
done => {
$lock.protect({ done() });
Expand Down

0 comments on commit 2180049

Please sign in to comment.