diff options
author | Eric Wong <e@80x24.org> | 2017-03-02 03:36:24 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2017-03-02 23:27:41 +0000 |
commit | a4df292ed39f6e02a7d57326f291583339cb562d (patch) | |
tree | 4cfb2e083756c400aa255a270b18fca97297668b /lib/PublicInbox/Git.pm | |
parent | 1c1d46455fc7fdd290f0d5533804b78bb9798898 (diff) | |
download | public-inbox-a4df292ed39f6e02a7d57326f291583339cb562d.tar.gz |
This will allow most source files to be displayed without blocking public-inbox-httpd on slow disk access. However, we no longer support displaying source files larger than 65536 bytes (the size of a pipe on current Linux).
Diffstat (limited to 'lib/PublicInbox/Git.pm')
-rw-r--r-- | lib/PublicInbox/Git.pm | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/PublicInbox/Git.pm b/lib/PublicInbox/Git.pm index 3ca0b680..aba4616e 100644 --- a/lib/PublicInbox/Git.pm +++ b/lib/PublicInbox/Git.pm @@ -283,6 +283,15 @@ sub check_async { } } +sub cat_async { + my ($self, $env, $obj, $cb) = @_; + if ($env->{'pi-httpd.async'}) { + cat_async_ds($self, $obj, $cb); + } else { + cat_async_compat($self, $obj, $cb); + } +} + 1; __END__ =pod |