Skip to content

Commit

Permalink
improved Mojo::Reactor::EV performance slightly
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Jan 8, 2015
1 parent 8deaf7e commit 677f1c6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Changes
@@ -1,5 +1,6 @@

5.72 2015-01-07
5.72 2015-01-08
- Improved Mojo::Reactor::EV performance slightly.

5.71 2015-01-01
- Updated Net::DNS::Native requirement to 0.15 for some important bug fixes.
Expand Down
1 change: 1 addition & 0 deletions examples/microhttpd.pl
Expand Up @@ -38,6 +38,7 @@
EOF

# Start event loop
local $SIG{INT} = local $SIG{TERM} = sub { Mojo::IOLoop->stop };
Mojo::IOLoop->start;

1;
2 changes: 1 addition & 1 deletion lib/Mojo/Reactor/EV.pm
Expand Up @@ -37,7 +37,7 @@ sub watch {
my $fd = fileno $handle;
my $io = $self->{io}{$fd};
if ($mode == 0) { delete $io->{watcher} }
elsif (my $w = $io->{watcher}) { $w->set($fd, $mode) }
elsif (my $w = $io->{watcher}) { $w->events($mode) }
else {
weaken $self;
$io->{watcher} = EV::io($fd, $mode, sub { $self->_io($fd, @_) });
Expand Down

0 comments on commit 677f1c6

Please sign in to comment.