Skip to content

Commit

Permalink
recurring timers cannot be zero in EV
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Feb 25, 2014
1 parent 21f6503 commit e8cdca0
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 12 deletions.
1 change: 0 additions & 1 deletion Changes
@@ -1,6 +1,5 @@

4.85 2014-02-26
- Updated EV requirement to 4.15 for certain bug fixes.
- Improved Mojo::Reactor::EV responsiveness.

4.84 2014-02-22
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojo/IOLoop.pm
Expand Up @@ -309,7 +309,7 @@ convenience the C<PIPE> signal will be set to C<IGNORE> when L<Mojo::IOLoop>
is loaded.
For better scalability (epoll, kqueue) and to provide IPv6 as well as TLS
support, the optional modules L<EV> (4.15+), L<IO::Socket::IP> (0.20+) and
support, the optional modules L<EV> (4.0+), L<IO::Socket::IP> (0.20+) and
L<IO::Socket::SSL> (1.75+) will be used automatically if they are installed.
Individual features can also be disabled with the MOJO_NO_IPV6 and MOJO_NO_TLS
environment variables.
Expand Down
5 changes: 3 additions & 2 deletions lib/Mojo/Reactor/EV.pm
@@ -1,7 +1,7 @@
package Mojo::Reactor::EV;
use Mojo::Base 'Mojo::Reactor::Poll';

use EV 4.15;
use EV 4.0;
use Scalar::Util 'weaken';

my $EV;
Expand Down Expand Up @@ -56,6 +56,7 @@ sub _io {

sub _timer {
my ($self, $recurring, $after, $cb) = @_;
$after ||= 0.0001 if $recurring;

my $id = $self->SUPER::_timer(0, 0, $cb);
weaken $self;
Expand Down Expand Up @@ -104,7 +105,7 @@ Mojo::Reactor::EV - Low level event reactor with libev support
=head1 DESCRIPTION
L<Mojo::Reactor::EV> is a low level event reactor based on L<EV> (4.15+).
L<Mojo::Reactor::EV> is a low level event reactor based on L<EV> (4.0+).
=head1 EVENTS
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojo/Server/Daemon.pm
Expand Up @@ -297,7 +297,7 @@ connection pooling, timeout, cookie, multipart and multiple event loop
support.
For better scalability (epoll, kqueue) and to provide IPv6 as well as TLS
support, the optional modules L<EV> (4.15+), L<IO::Socket::IP> (0.20+) and
support, the optional modules L<EV> (4.0+), L<IO::Socket::IP> (0.20+) and
L<IO::Socket::SSL> (1.75+) will be used automatically by L<Mojo::IOLoop> if
they are installed. Individual features can also be disabled with the
MOJO_NO_IPV6 and MOJO_NO_TLS environment variables.
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojo/Server/Hypnotoad.pm
Expand Up @@ -185,7 +185,7 @@ This second invocation will load the application again, detect the process id
file with it, and send a L</"USR2"> signal to the already running server.
For better scalability (epoll, kqueue) and to provide IPv6 as well as TLS
support, the optional modules L<EV> (4.15+), L<IO::Socket::IP> (0.20+) and
support, the optional modules L<EV> (4.0+), L<IO::Socket::IP> (0.20+) and
L<IO::Socket::SSL> (1.75+) will be used automatically by L<Mojo::IOLoop> if
they are installed. Individual features can also be disabled with the
MOJO_NO_IPV6 and MOJO_NO_TLS environment variables.
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojo/Server/Morbo.pm
Expand Up @@ -128,7 +128,7 @@ To start applications with it you can use the L<morbo> script.
Server available at http://127.0.0.1:3000.
For better scalability (epoll, kqueue) and to provide IPv6 as well as TLS
support, the optional modules L<EV> (4.15+), L<IO::Socket::IP> (0.20+) and
support, the optional modules L<EV> (4.0+), L<IO::Socket::IP> (0.20+) and
L<IO::Socket::SSL> (1.75+) will be used automatically by L<Mojo::IOLoop> if
they are installed. Individual features can also be disabled with the
MOJO_NO_IPV6 and MOJO_NO_TLS environment variables.
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojo/Server/Prefork.pm
Expand Up @@ -260,7 +260,7 @@ loop support. Note that the server uses signals for process management, so you
should avoid modifying signal handlers in your applications.
For better scalability (epoll, kqueue) and to provide IPv6 as well as TLS
support, the optional modules L<EV> (4.15+), L<IO::Socket::IP> (0.20+) and
support, the optional modules L<EV> (4.0+), L<IO::Socket::IP> (0.20+) and
L<IO::Socket::SSL> (1.75+) will be used automatically by L<Mojo::IOLoop> if
they are installed. Individual features can also be disabled with the
MOJO_NO_IPV6 and MOJO_NO_TLS environment variables.
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojo/UserAgent.pm
Expand Up @@ -472,7 +472,7 @@ this allows multiple processes to share the same L<Mojo::UserAgent> object
safely.
For better scalability (epoll, kqueue) and to provide IPv6 as well as TLS
support, the optional modules L<EV> (4.15+), L<IO::Socket::IP> (0.20+) and
support, the optional modules L<EV> (4.0+), L<IO::Socket::IP> (0.20+) and
L<IO::Socket::SSL> (1.75+) will be used automatically by L<Mojo::IOLoop> if
they are installed. Individual features can also be disabled with the
MOJO_NO_IPV6 and MOJO_NO_TLS environment variables.
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojolicious/Command/version.pm
Expand Up @@ -23,7 +23,7 @@ CORE
Mojolicious ($Mojolicious::VERSION, $Mojolicious::CODENAME)
OPTIONAL
EV 4.15+ ($ev)
EV 4.0+ ($ev)
IO::Socket::IP 0.20+ ($ipv6)
IO::Socket::SSL 1.75+ ($tls)
Expand Down
3 changes: 1 addition & 2 deletions t/mojo/reactor_ev.t
Expand Up @@ -6,8 +6,7 @@ use Test::More;

plan skip_all => 'set TEST_EV to enable this test (developer only!)'
unless $ENV{TEST_EV};
plan skip_all => 'EV 4.15 required for this test!'
unless eval 'use EV 4.15; 1';
plan skip_all => 'EV 4.0 required for this test!' unless eval 'use EV 4.0; 1';

use IO::Socket::INET;

Expand Down

0 comments on commit e8cdca0

Please sign in to comment.