Skip to content

Commit

Permalink
removed IO::Async recipe for now
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Jun 8, 2012
1 parent a08e4ee commit 74ff0ac
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 22 deletions.
2 changes: 1 addition & 1 deletion Changes
@@ -1,5 +1,5 @@

2.99 2012-06-08
2.99 2012-06-09
- Improved message parser performance slightly.
- Improved documentation. (ichesnokov, sri)
- Improved tests.
Expand Down
22 changes: 1 addition & 21 deletions lib/Mojolicious/Guides/Cookbook.pod
Expand Up @@ -625,27 +625,7 @@ which can be combined to solve some of hardest problems in web development.

Internally the L<Mojo::IOLoop> reactor can use multiple event loop backends,
L<EV> for example will be automatically used if installed. Which in turn
allows event loops like L<IO::Async> to just work.

use Mojolicious::Lite;
use EV;
use IO::Async::Loop::EV;
use IO::Async::Timer::Absolute;

my $loop = IO::Async::Loop::EV->new;

# Wait 3 seconds before rendering a response
get '/' => sub {
my $self = shift;
$loop->add(IO::Async::Timer::Absolute->new(
time => time + 3,
on_expire => sub { $self->render(text => 'Delayed by 3 seconds!') }
));
};

app->start;

Same for L<AnyEvent>.
allows event loops like L<AnyEvent> to just work.

use Mojolicious::Lite;
use EV;
Expand Down

0 comments on commit 74ff0ac

Please sign in to comment.