about summary refs log tree commit homepage
path: root/lib/PublicInbox/Listener.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2019-05-03 10:34:09 +0000
committerEric Wong <e@80x24.org>2019-05-05 00:22:49 +0000
commit5aaea61844b92c452c201ce9832e3c5c68c6f84e (patch)
tree7afcdd8e62af3d0611bd24d04f7d44fe8faf7487 /lib/PublicInbox/Listener.pm
parentcd50d183273c105a7f08b1875ba6f7a51d9f8e9a (diff)
downloadpublic-inbox-5aaea61844b92c452c201ce9832e3c5c68c6f84e.tar.gz
Since our listen sockets are non-blocking and we may run
multiple httpd|nntpd processes; we need a way to avoid
thundering herds when there are multiple httpd|nntpd worker
processes.

EPOLLEXCLUSIVE was added just for that in Linux 4.5
Diffstat (limited to 'lib/PublicInbox/Listener.pm')
-rw-r--r--lib/PublicInbox/Listener.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/PublicInbox/Listener.pm b/lib/PublicInbox/Listener.pm
index d1f0d2e9..a75a6fd9 100644
--- a/lib/PublicInbox/Listener.pm
+++ b/lib/PublicInbox/Listener.pm
@@ -17,7 +17,7 @@ sub new ($$$) {
         listen($s, 1024);
         IO::Handle::blocking($s, 0);
         my $self = fields::new($class);
-        $self->SUPER::new($s); # calls epoll_create for the first socket
+        $self->SUPER::new($s, 1); # calls epoll_create for the first socket
         $self->watch_read(1);
         $self->{post_accept} = $cb;
         $self