From: Eric Wong Date: Tue, 16 Mar 2021 08:48:07 +0000 (-0500) Subject: git: drop async_prefetch method X-Git-Tag: v1.7.0~967 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=fcb6e079c32ac2bbf5c5ee85e4d99b40c1b638d7;p=public-inbox.git git: drop async_prefetch method That logic is inlined directly into git_async_prefetch in GitAsyncCat and I don't see it being useful outside of a DS event loop. --- diff --git a/lib/PublicInbox/Git.pm b/lib/PublicInbox/Git.pm index e176921c..f680eb2f 100644 --- a/lib/PublicInbox/Git.pm +++ b/lib/PublicInbox/Git.pm @@ -467,20 +467,6 @@ sub cat_async ($$$;$) { push(@$inflight, $oid, $cb, $arg); } -sub async_prefetch { - my ($self, $oid, $cb, $arg) = @_; - if (my $inflight = $self->{inflight}) { - # we could use MAX_INFLIGHT here w/o the halving, - # but lets not allow one client to monopolize a git process - if (scalar(@$inflight) < int(MAX_INFLIGHT/2)) { - print { $self->{out} } $oid, "\n" or - $self->fail("write error: $!"); - return push(@$inflight, $oid, $cb, $arg); - } - } - undef; -} - sub extract_cmt_time { my ($bref, undef, undef, undef, $modified) = @_;