Skip to content

Commit

Permalink
better delay example
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Apr 4, 2013
1 parent f63ec86 commit 3017f01
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/Mojo/IOLoop/Delay.pm
Expand Up @@ -152,9 +152,10 @@ the active event counter again, all arguments are queued in the right order
for the next step or C<finish> event and C<wait> method. The first argument
passed to the callback will be ignored by default.
# Capture all arguments
my $delay = Mojo::IOLoop->delay;
Mojo::UserAgent->new->get('mojolicio.us' => $delay->begin);
my $tx = $delay->wait;
Mojo::IOLoop->client({port => 3000} => $delay->begin(0));
my ($loop, $err, $stream) = $delay->wait;
=head2 steps
Expand Down

0 comments on commit 3017f01

Please sign in to comment.