Skip to content

Commit

Permalink
renamed idle_interval to accept_interval
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Jun 20, 2012
1 parent 985ded8 commit 41fd041
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Changes
Expand Up @@ -8,7 +8,7 @@
- Switched back from IO::Socket::INET6 to IO::Socket::IP for IPv6 support.
- Switched from HMAC-MD5 to HMAC-SHA1 for signed cookies.
- Added j and r functions to ojo. (sharifulin, sri)
- Added idle_interval attribute to Mojo::IOLoop.
- Added accept_interval attribute to Mojo::IOLoop.
- Added support for new HTTP status code.
- Modernized ".perltidyrc".
- Improved to method in Mojolicious::Routes::Route to give easier access to
Expand Down
24 changes: 12 additions & 12 deletions lib/Mojo/IOLoop.pm
Expand Up @@ -13,8 +13,8 @@ use Time::HiRes 'time';

use constant DEBUG => $ENV{MOJO_IOLOOP_DEBUG} || 0;

has client_class => 'Mojo::IOLoop::Client';
has idle_interval => 0.025;
has accept_interval => 0.025;
has client_class => 'Mojo::IOLoop::Client';
has [qw(lock unlock)];
has max_accepts => 0;
has max_connections => 1000;
Expand Down Expand Up @@ -218,7 +218,7 @@ sub _listening {
sub _manage {
my $self = shift;
$self->{manager} ||= $self->recurring(
$self->idle_interval => sub {
$self->accept_interval => sub {
my $self = shift;

# Start listening if possible
Expand Down Expand Up @@ -356,6 +356,15 @@ See L<Mojolicious::Guides::Cookbook> for more.
L<Mojo::IOLoop> implements the following attributes.
=head2 C<accept_interval>
my $interval = $loop->accept_interval;
$loop = $loop->accept_interval(0.5);
Interval in seconds for trying to reacquire the accept mutex and connection
management, defaults to C<0.025>. Note that changing this value can affect
performance and idle cpu usage.
=head2 C<client_class>
my $class = $loop->client_class;
Expand All @@ -364,15 +373,6 @@ L<Mojo::IOLoop> implements the following attributes.
Class to be used for opening TCP connections with the C<client> method,
defaults to L<Mojo::IOLoop::Client>.
=head2 C<idle_interval>
my $interval = $loop->idle_interval;
$loop = $loop->idle_interval(0.5);
Interval in seconds for checking the accept mutex and managing connections,
defaults to C<0.025>. Note that changing this value can affect performance and
idle cpu usage.
=head2 C<lock>
my $cb = $loop->lock;
Expand Down

0 comments on commit 41fd041

Please sign in to comment.