]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/LeiP2q.pm
get rid of unnecessary bytes::length usage
[public-inbox.git] / lib / PublicInbox / LeiP2q.pm
index deb3197483fd2186a3e75028d36b86d474d5cab0..c0c4563d6fbb86a1638bf1917bf83f41d9a5525b 100644 (file)
@@ -188,11 +188,11 @@ sub lei_p2q { # the "lei patch-to-query" entry point
        } else {
                $self->{input} = $input;
        }
-       my ($op, $ops) = $lei->workers_start($self, 'lei-p2q', 1);
-       $lei->{p2q} = $self;
+       my ($op_c, $ops) = $lei->workers_start($self, 1);
+       $lei->{wq1} = $self;
        $self->wq_io_do('do_p2q', []);
        $self->wq_close(1);
-       $op->op_wait_event($ops);
+       $lei->wait_wq_events($op_c, $ops);
 }
 
 sub ipc_atfork_child {
@@ -201,10 +201,4 @@ sub ipc_atfork_child {
        $self->SUPER::ipc_atfork_child;
 }
 
-sub _lei_wq_eof { # EOF callback for main daemon
-       my ($lei) = @_;
-       my $p2q = delete $lei->{p2q} // return $lei->dclose;
-       $p2q->wq_wait_old($lei->can('wq_done_wait'), $lei);
-}
-
 1;