Permalink
Browse files

Properly throw exceptions in taps

  • Loading branch information...
lizmat committed Apr 18, 2014
1 parent 1b47edb commit 21800496f2b065189afbe3f7833f02d4258be517
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/core/Supply.pm
View
@@ -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);
@@ -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() });

0 comments on commit 2180049

Please sign in to comment.