user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
From: Eric Wong <>
Subject: [PATCH 2/3] inboxidle: support Linux::Inotify2 1.x
Date: Sun, 14 Jun 2020 00:25:04 +0000	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

Linux::Inotify2 1.x lacked ->on_overflow and ->broadcast
methods.  Just don't use them for now.  We may eventually
provide a pure Perl alternative which doesn't require closures,
XS, or the common::sense dependency.

Overflowing the inotify queue seems difficult to trigger at
the moment: /proc/sys/fs/inotify/max_queued_events defaults
to 16384 on a my CentOS 7.x VM with 2GB RAM.
 lib/PublicInbox/ | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lib/PublicInbox/ b/lib/PublicInbox/
index c19b8d18..d60d4f23 100644
--- a/lib/PublicInbox/
+++ b/lib/PublicInbox/
@@ -58,7 +58,10 @@ sub new {
 		my $sock = gensym;
 		tie *$sock, 'PublicInbox::In2Tie', $inot;
-		$inot->on_overflow(undef); # broadcasts everything on overflow
+		if ($inot->can('on_overflow')) {
+			 # broadcasts everything on overflow
+			$inot->on_overflow(undef);
+		}
 		$self->SUPER::new($sock, EPOLLIN | EPOLLET);
 	} else {
 		require PublicInbox::FakeInotify;

  parent reply	other threads:[~2020-06-14  0:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-14  0:25 [PATCH 0/3] IMAP fixes for older systems Eric Wong
2020-06-14  0:25 ` [PATCH 1/3] testcommon: allow OR-ing module dependencies Eric Wong
2020-06-14  0:25 ` Eric Wong [this message]
2020-06-14  0:25 ` [PATCH 3/3] t/imapd*.t: support older Mail::IMAPClient Eric Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this inbox:

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).