Skip to content

Commit

Permalink
fixed recurring example
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Dec 13, 2011
1 parent fa05aa0 commit 6e4df95
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Changes
@@ -1,6 +1,6 @@
This file documents the revision history for Perl extension Mojolicious.

2.38 2011-12-12 00:00:00
2.38 2011-12-13 00:00:00
- Improved documentation. (marcus, sri)
- Improved tests.
- Fixed memory leaks caused by named capture groups bug in Perl.
Expand Down
9 changes: 3 additions & 6 deletions lib/Mojo/IOLoop.pm
Expand Up @@ -699,13 +699,10 @@ amount of time in seconds.
Create a new recurring timer, invoking the callback repeatedly after a given
amount of seconds.
This for example allows you to run multiple reactors next to each other.
my $loop2 = Mojo::IOLoop->new(timeout => 0);
Mojo::IOLoop->recurring(0 => sub { $loop2->one_tick });
Note that the loop timeout can be changed dynamically at any time to adjust
responsiveness.
# Run multiple reactors next to each other
my $loop2 = Mojo::IOLoop->new;
Mojo::IOLoop->recurring(0 => sub { $loop2->one_tick(0) });
=head2 C<server>
Expand Down

0 comments on commit 6e4df95

Please sign in to comment.