]> Sergey Matveev's repositories - public-inbox.git/commitdiff
lei q: do not spawn MUA early
authorEric Wong <e@80x24.org>
Tue, 19 Jan 2021 09:34:29 +0000 (09:34 +0000)
committerEric Wong <e@80x24.org>
Thu, 21 Jan 2021 03:29:09 +0000 (03:29 +0000)
I'm not sure why, but mutt sometimes won't detect small
quickly.  We'll display a progress bar meter when writing
results, instead.

lib/PublicInbox/LeiToMail.pm
lib/PublicInbox/LeiXSearch.pm

index 8e58ad110fa8d0f56d82c2d620f6f3cca445c573..99388b5b2efef4b9a08c91a515562b4bea76d51b 100644 (file)
@@ -439,10 +439,6 @@ sub post_augment { # fast (spawn compressor or mkdir), runs in main daemon
        $self->$m($lei);
 }
 
-sub lock_free {
-       $_[0]->{base_type} =~ /\A(?:maildir|mh|imap|jmap)\z/ ? 1 : 0;
-}
-
 sub write_mail { # via ->wq_do
        my ($self, $git_dir, $oid, $lei, $kw) = @_;
        my $not_done = delete $self->{4}; # write end of {each_smsg_done}
index 45a073a06289d3c103e6e3f6f2fe7859b0c8958f..120857b80cfd240a951af01c74de189530558755 100644 (file)
@@ -191,7 +191,7 @@ sub query_done { # EOF callback
                dwaitpid($_, $ipc_worker_reap, $l2m) for @$pids;
        }
        $lei->{ovv}->ovv_end($lei);
-       $lei->start_mua if $l2m && !$l2m->lock_free;
+       $lei->start_mua if $l2m;
        $lei->dclose;
 }
 
@@ -201,7 +201,6 @@ sub start_query { # always runs in main (lei-daemon) process
                $lei->{1} = $io->[1];
                $l2m->post_augment($lei);
                $io->[1] = delete $lei->{1};
-               $lei->start_mua($io->[3]) if $l2m->lock_free;
        }
        my $remotes = $self->{remotes} // [];
        if ($lei->{opt}->{thread}) {