AnyEvent-ProcessPool

 view release on metacpan or  search on metacpan

lib/AnyEvent/ProcessPool.pm  view on Meta::CPAN

  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
    if (ref $self->{pool}) {
      foreach my $worker (@{$self->{pool}}) {
        $worker->stop if $worker;
      }
    }
  }
}

sub async {
  my ($self, $code, @args) = @_;



( run in 0.644 second using v1.01-cache-2.11-cpan-df04353d9ac )