Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
use the class method in examples
  • Loading branch information
kraih committed Nov 4, 2017
1 parent d7be7d0 commit e0c08e0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/Mojo/IOLoop.pm
Expand Up @@ -421,7 +421,7 @@ Callbacks will be passed along to L<Mojo::IOLoop::Delay/"steps">.
}
my $mojo = get('http://mojolicious.org');
my $cpan = get('http://metacpan.org');
$mojo->race($cpan)->then(sub { say shift->req->url })->wait;
Mojo::Promise->race($mojo, $cpan)->then(sub { say shift->req->url })->wait;
# Synchronize multiple non-blocking operations
my $delay = Mojo::IOLoop->delay(sub { say 'BOOM!' });
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojo/Promise.pm
Expand Up @@ -141,7 +141,7 @@ Mojo::Promise - Promises/A+
}
my $mojo = get('http://mojolicious.org');
my $cpan = get('http://metacpan.org');
$mojo->race($cpan)->then(sub { say shift->req->url })->wait;
Mojo::Promise->race($mojo, $cpan)->then(sub { say shift->req->url })->wait;
=head1 DESCRIPTION
Expand Down

0 comments on commit e0c08e0

Please sign in to comment.