]> git.ipfire.org Git - thirdparty/public-inbox.git/commit
lei: allow Ctrl-C to interrupt IMAP+NNTP reads
authorEric Wong <e@80x24.org>
Tue, 20 Aug 2024 10:35:20 +0000 (10:35 +0000)
committerEric Wong <e@80x24.org>
Wed, 21 Aug 2024 18:16:26 +0000 (18:16 +0000)
commit1dbd07779b33421829367fea6c90dfe379208ef9
tree1f7787063bb3707b15331258844ada7b7a6de030
parentcd85a76f31b8d93ff686c1f89e476daf269f1a90
lei: allow Ctrl-C to interrupt IMAP+NNTP reads

Mail::IMAPClient and Net::NNTP remain synchronous APIs with
indefinite wait times on slow/unreliable connections or servers.

Since these APIs don't play nicely with signalfd or
EVFILT_SIGNAL, we will temporarily drop the reliable (but
sometimes delayed) signal handling mechanisms in favor of the
less reliable built-in signal handling of Perl to provide a
best-effort attempt to handle signals during slow operations.
lib/PublicInbox/NetReader.pm