App-mirai
view release on metacpan or search on metacpan
lib/App/mirai/Future.pm view on Meta::CPAN
};
# ... but we don't want to hold on to the real Future and cause cycles,
# memory isn't free
Scalar::Util::weaken($entry->{future});
my $name = "$f";
$FUTURE_MAP{$name} = $entry;
# Yes, this means we're modifying the callback list: if we later
# add support for debugging the callbacks as well, we'd need to
# take this into account.
$f->on_ready(sub {
my $f = shift;
my (undef, $file, $line) = caller(2);
$FUTURE_MAP{$f}->{status} =
$f->{failure}
? "failed"
: $f->{cancelled}
? "cancelled"
: "done";
( run in 0.682 second using v1.01-cache-2.11-cpan-9b1e4054eb1 )