AnyEvent-ProcessPool
view release on metacpan or search on metacpan
lib/AnyEvent/ProcessPool.pm view on Meta::CPAN
sub join {
my $self = shift;
foreach my $task_id (keys %{$self->{complete}}) {
if (my $cv = $self->{complete}{$task_id}) {
$cv->recv;
}
}
}
sub DESTROY {
my ($self, $global) = @_;
if ($self) {
# Unblock watchers for any remaining pending tasks
if (ref $self->{pending}) {
foreach my $cv (values %{$self->{pending}}) {
$cv->croak('AnyEvent::ProcessPool destroyed with pending tasks remaining');
}
}
# Terminate any workers still alive
( run in 0.502 second using v1.01-cache-2.11-cpan-49f99fa48dc )