AnyEvent::Subprocess::Running::Delegate::CompletionCondvar - Running part of the CompletionCondvar delegate


AnyEvent-Subprocess documentation Contained in the AnyEvent-Subprocess distribution.

Index


Code Index:

NAME

Top

AnyEvent::Subprocess::Running::Delegate::CompletionCondvar - Running part of the CompletionCondvar delegate

VERSION

Top

version 1.102912

ATTRIBUTES

Top

condvar

An AnyEvent::Condvar that is invoked with the Done instance when the process exits.

send

recv

These methods are delegated from the condvar to this class, to save a bit of typing.

AUTHOR

Top

Jonathan Rockway <jrockway@cpan.org>

COPYRIGHT AND LICENSE

Top


AnyEvent-Subprocess documentation Contained in the AnyEvent-Subprocess distribution.

package AnyEvent::Subprocess::Running::Delegate::CompletionCondvar;
BEGIN {
  $AnyEvent::Subprocess::Running::Delegate::CompletionCondvar::VERSION = '1.102912';
}
# ABSTRACT: Running part of the CompletionCondvar delegate
use Moose;
use AnyEvent;

with 'AnyEvent::Subprocess::Running::Delegate';

has 'condvar' => (
    is       => 'ro',
    isa      => 'AnyEvent::CondVar',
    default  => sub { AnyEvent->condvar },
    handles  => [qw[send recv]],
    required => 1,
);

sub completion_hook {
    my ($self, $running, $args) = @_;
    $self->send($args->{done});
}

sub build_events {}
sub build_done_delegates {}

__PACKAGE__->meta->make_immutable;

1;




__END__