about summary refs log tree commit homepage
path: root/lib/PublicInbox/IPC.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2023-05-03 06:33:25 +0000
committerEric Wong <e@80x24.org>2023-05-03 08:18:43 +0000
commit21ea29baad3268a024b67e1b3b0acd4a05edf39a (patch)
tree8518c7d1757be82981355157ad086a8c1d3b16ad /lib/PublicInbox/IPC.pm
parentec0c6db858d34a3a63cf86ddd090e28c28cfca3a (diff)
downloadpublic-inbox-21ea29baad3268a024b67e1b3b0acd4a05edf39a.tar.gz
SOCK_SEQPACKET is used whenever we care about parallel writes to
a socket, so there's no need to mess with locks in userspace
code.
Diffstat (limited to 'lib/PublicInbox/IPC.pm')
-rw-r--r--lib/PublicInbox/IPC.pm11
1 files changed, 0 insertions, 11 deletions
diff --git a/lib/PublicInbox/IPC.pm b/lib/PublicInbox/IPC.pm
index cca3dacb..c154724e 100644
--- a/lib/PublicInbox/IPC.pm
+++ b/lib/PublicInbox/IPC.pm
@@ -173,15 +173,6 @@ sub ipc_worker_stop {
         awaitpid($pid) if $$ == $ppid; # for non-event loop
 }
 
-# use this if we have multiple readers reading curl or "pigz -dc"
-# and writing to the same store
-sub ipc_lock_init {
-        my ($self, $f) = @_;
-        $f // die 'BUG: no filename given';
-        require PublicInbox::Lock;
-        $self->{-ipc_lock} //= bless { lock_path => $f }, 'PublicInbox::Lock'
-}
-
 sub _wait_return ($$) {
         my ($r_res, $sub) = @_;
         my $ret = _get_rec($r_res) // die "no response on $sub";
@@ -193,8 +184,6 @@ sub _wait_return ($$) {
 sub ipc_do {
         my ($self, $sub, @args) = @_;
         if (my $w_req = $self->{-ipc_req}) { # run in worker
-                my $ipc_lock = $self->{-ipc_lock};
-                my $lock = $ipc_lock ? $ipc_lock->lock_for_scope : undef;
                 if (defined(wantarray)) {
                         my $r_res = $self->{-ipc_res} or die 'no ipc_res';
                         _send_rec($w_req, [ wantarray, $sub, @args ]);