Skip to content

Commit

Permalink
We don't need a vow as we don't expose the Promise
Browse files Browse the repository at this point in the history
  • Loading branch information
lizmat committed May 1, 2014
1 parent 8ddb1e7 commit fd5f8eb
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/core/Supply.pm
Expand Up @@ -106,20 +106,19 @@ my role Supply {
method wait() {
my $l = Lock.new;
my $p = Promise.new;
my $v = $p.vow;
my $t = self.tap( -> \val {},
done => {
$l.protect( {
if $p.status == Planned {
$v.keep(True);
$p.keep(True);
$t.close()
}
} );
},
quit => -> \ex {
$l.protect( {
if $p.status == Planned {
$v.break(ex);
$p.break(ex);
$t.close()
}
} );
Expand Down

0 comments on commit fd5f8eb

Please sign in to comment.