AnyEvent-Future

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

 new_timeout

       $f = AnyEvent::Future->new_timeout( @args )

    Returns a new leaf future instance that will become ready at the time
    given by the arguments, which will be passed to the AnyEvent->timer
    method.

    new_delay returns a future that will complete successfully at the
    alotted time, whereas new_timeout returns a future that will fail with
    the message Timeout. This is provided as a simple utility for small
    use-cases; for a more find-grained control over the failure message and
    additional values you may wish to use new_delay combined with the
    then_fail method:

       new_delay( after => 10 )
          ->then_fail( "The operation timed out after 10 seconds", timeout => );

 from_cv

       $f = AnyEvent::Future->from_cv( $cv )

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


=head2 new_timeout

   $f = AnyEvent::Future->new_timeout( @args )

Returns a new leaf future instance that will become ready at the time given by
the arguments, which will be passed to the C<< AnyEvent->timer >> method.

C<new_delay> returns a future that will complete successfully at the alotted
time, whereas C<new_timeout> returns a future that will fail with the message
C<Timeout>. This is provided as a simple utility for small use-cases; for a
more find-grained control over the failure message and additional values you
may wish to use C<new_delay> combined with the C<then_fail> method:

   new_delay( after => 10 )
      ->then_fail( "The operation timed out after 10 seconds", timeout => );

=cut

sub new_delay
{

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 1.527 second using v1.00-cache-2.02-grep-82fe00e-cpan-f5108d614456 )