From 34c1a6c16733adee3acfe5861096692f3ea55378 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 10 Jun 2020 07:04:01 +0000 Subject: inboxidle: new class to detect inbox changes This will be used to implement IMAP IDLE, first. Eventually, it may be used to trigger other things: * incremental internal updates for manifest.js.gz * restart `git cat-file' processes on pack index unlink * IMAP IDLE-like long-polling HTTP endpoint And maybe more things we haven't thought of, yet. It uses Linux::Inotify2 or IO::KQueue depending on what packages are installed and what the kernel supports. It falls back to nanosecond-aware Time::HiRes::stat() (available with Perl 5.10.0+) on systems lacking Linux::Inotify2 and IO::KQueue. In the future, a pure Perl alternative to Linux::Inotify2 may be supplied for users of architectures we already support signalfd and epoll on. v2 changes: - avoid O_TRUNC on lock file - change ctime on Linux systems w/o inotify - fix naming of comments and fields --- MANIFEST | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'MANIFEST') diff --git a/MANIFEST b/MANIFEST index 73b874b4..8aff192c 100644 --- a/MANIFEST +++ b/MANIFEST @@ -109,6 +109,7 @@ lib/PublicInbox/Emergency.pm lib/PublicInbox/Eml.pm lib/PublicInbox/EmlContentFoo.pm lib/PublicInbox/ExtMsg.pm +lib/PublicInbox/FakeInotify.pm lib/PublicInbox/Feed.pm lib/PublicInbox/Filter/Base.pm lib/PublicInbox/Filter/Gmane.pm @@ -129,8 +130,11 @@ lib/PublicInbox/IMAP.pm lib/PublicInbox/IMAPD.pm lib/PublicInbox/IMAPdeflate.pm lib/PublicInbox/Import.pm +lib/PublicInbox/In2Tie.pm lib/PublicInbox/Inbox.pm +lib/PublicInbox/InboxIdle.pm lib/PublicInbox/InboxWritable.pm +lib/PublicInbox/KQNotify.pm lib/PublicInbox/Linkify.pm lib/PublicInbox/Listener.pm lib/PublicInbox/Lock.pm @@ -266,6 +270,7 @@ t/imapd-tls.t t/imapd.t t/import.t t/inbox.t +t/inbox_idle.t t/index-git-times.t t/indexlevels-mirror-v1.t t/indexlevels-mirror.t -- cgit v1.2.3-24-ge0c7