* [PATCH 2/3] inboxidle: support Linux::Inotify2 1.x
2020-06-14 0:25 5% [PATCH 0/3] IMAP fixes for older systems Eric Wong
@ 2020-06-14 0:25 7% ` Eric Wong
0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2020-06-14 0:25 UTC (permalink / raw)
To: meta
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/InboxIdle.pm | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/lib/PublicInbox/InboxIdle.pm b/lib/PublicInbox/InboxIdle.pm
index c19b8d18..d60d4f23 100644
--- a/lib/PublicInbox/InboxIdle.pm
+++ b/lib/PublicInbox/InboxIdle.pm
@@ -58,7 +58,10 @@ sub new {
my $sock = gensym;
tie *$sock, 'PublicInbox::In2Tie', $inot;
$inot->blocking(0);
- $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;
^ permalink raw reply related [relevance 7%]
* [PATCH 0/3] IMAP fixes for older systems
@ 2020-06-14 0:25 5% Eric Wong
2020-06-14 0:25 7% ` [PATCH 2/3] inboxidle: support Linux::Inotify2 1.x Eric Wong
0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2020-06-14 0:25 UTC (permalink / raw)
To: meta
Eric Wong (3):
testcommon: allow OR-ing module dependencies
inboxidle: support Linux::Inotify2 1.x
t/imapd*.t: support older Mail::IMAPClient
lib/PublicInbox/InboxIdle.pm | 5 ++++-
lib/PublicInbox/TestCommon.pm | 11 ++++++++++-
t/imap.t | 6 +++---
t/imapd-tls.t | 7 +++++--
t/imapd.t | 9 +++++----
xt/imapd-mbsync-oimap.t | 1 +
xt/imapd-validate.t | 2 +-
xt/mem-imapd-tls.t | 2 +-
8 files changed, 30 insertions(+), 13 deletions(-)
^ permalink raw reply [relevance 5%]
Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2020-06-14 0:25 5% [PATCH 0/3] IMAP fixes for older systems Eric Wong
2020-06-14 0:25 7% ` [PATCH 2/3] inboxidle: support Linux::Inotify2 1.x Eric Wong
Code repositories for project(s) associated with this public inbox
https://80x24.org/public-inbox.git
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).