From: Eric Wong <e@80x24.org>
To: meta@public-inbox.org
Subject: [PATCH 2/3] ipc: remove WQ_MAX_WORKERS
Date: Tue, 17 Aug 2021 08:52:40 +0000 [thread overview]
Message-ID: <20210817085241.25592-3-e@80x24.org> (raw)
In-Reply-To: <20210817085241.25592-1-e@80x24.org>
We no longer rely on IO::FDPass, so there's no longer a reason
to limit this internally.
---
lib/PublicInbox/IPC.pm | 5 -----
1 file changed, 5 deletions(-)
diff --git a/lib/PublicInbox/IPC.pm b/lib/PublicInbox/IPC.pm
index d909dc1c..9efe551b 100644
--- a/lib/PublicInbox/IPC.pm
+++ b/lib/PublicInbox/IPC.pm
@@ -20,7 +20,6 @@ use Socket qw(AF_UNIX MSG_EOR SOCK_STREAM);
my $MY_MAX_ARG_STRLEN = 4096 * 33; # extra 4K for serialization
my $SEQPACKET = eval { Socket::SOCK_SEQPACKET() }; # portable enough?
our @EXPORT_OK = qw(ipc_freeze ipc_thaw);
-my $WQ_MAX_WORKERS = 4096;
my ($enc, $dec);
# ->imports at BEGIN turns sereal_*_with_object into custom ops on 5.14+
# and eliminate method call overhead
@@ -354,7 +353,6 @@ sub wq_workers_start {
die "socketpair: $!";
$self->ipc_atfork_prepare;
$nr_workers //= $self->{-wq_nr_workers};
- $nr_workers = $WQ_MAX_WORKERS if $nr_workers > $WQ_MAX_WORKERS;
my $sigset = $oldset // PublicInbox::DS::block_signals();
$self->{-wq_workers} = {};
$self->{-wq_ident} = $ident;
@@ -367,7 +365,6 @@ sub wq_worker_incr { # SIGTTIN handler
my ($self, $oldset, $fields) = @_;
$self->{-wq_s2} or return;
die "-wq_nr_workers locked" if defined $self->{-wq_nr_workers};
- return if wq_workers($self) >= $WQ_MAX_WORKERS;
$self->ipc_atfork_prepare;
my $sigset = $oldset // PublicInbox::DS::block_signals();
_wq_worker_start($self, $sigset, $fields);
@@ -443,8 +440,6 @@ sub wq_kill {
kill($sig // 'TERM', keys %$workers);
}
-sub WQ_MAX_WORKERS { $WQ_MAX_WORKERS }
-
sub DESTROY {
my ($self) = @_;
my $ppid = $self->{-wq_ppid};
next prev parent reply other threads:[~2021-08-17 8:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-17 8:52 [PATCH 0/3] lei: some mail sync stuff Eric Wong
2021-08-17 8:52 ` [PATCH 1/3] lei: add ->lms shortcut for LeiMailSync Eric Wong
2021-08-17 8:52 ` Eric Wong [this message]
2021-08-17 8:52 ` [PATCH 3/3] lei forget-mail-sync: rely on lei/store process 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:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://public-inbox.org/README
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210817085241.25592-3-e@80x24.org \
--to=e@80x24.org \
--cc=meta@public-inbox.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* 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.
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).