From 77d030df1d292a99291371b3649cff3657fd93c8 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 17 Aug 2021 08:52:40 +0000 Subject: ipc: remove WQ_MAX_WORKERS 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(-) (limited to 'lib/PublicInbox/IPC.pm') 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}; -- cgit v1.2.3-24-ge0c7