Subject: | Return $self from ->on_cancel? |
It'd be useful for symmetry to have ->on_cancel return $self, same as ->on_done / ->on_fail behaviour.
At the moment:
my $f = Future->new
->on_done(sub { ... })
->on_fail(sub { ... });
works as expected, but:
my $f = Future->new
->on_done(sub { ... })
->on_fail(sub { ... })
->on_cancel(sub { ... });
doesn't - $f ends up as either undef or 1 in the above example.
cheers,
Tom