]> Sergey Matveev's repositories - public-inbox.git/commitdiff
httpd: document pi-httpd.async as totally unstable
authorEric Wong <e@80x24.org>
Tue, 1 Mar 2016 07:48:53 +0000 (07:48 +0000)
committerEric Wong <e@80x24.org>
Tue, 1 Mar 2016 08:33:52 +0000 (08:33 +0000)
We'll have to use it some more before deciding it is a public
interface.  I do hope for it to be a usable public interface
one day for other users.

lib/PublicInbox/GitHTTPBackend.pm
script/public-inbox-httpd

index 56bf24f4588c97036bf39291cb93016621528896..c84eefcfa3ac15a9e366a0a3d4f8136c3d6f0d3c 100644 (file)
@@ -224,7 +224,7 @@ sub serve_smart {
        if (my $async = $env->{'pi-httpd.async'}) {
                $rpipe = $async->($rpipe, $cb);
                sub { ($res) = @_ } # let Danga::Socket handle the rest.
-       } else { # synchronous loop
+       } else { # synchronous loop for other PSGI servers
                $vin = '';
                vec($vin, fileno($rpipe), 1) = 1;
                sub {
index f1a5d7992a4e539a261bfee044378922f9abea6f..d4070595d16eea44a35b0e8b290e02e978a4b77c 100755 (executable)
@@ -59,6 +59,10 @@ daemon_run('0.0.0.0:8080', $refresh,
 
 1;
 
+# XXX This is a totally unstable API for public-inbox internal use only
+# This is exposed via the 'pi-httpd.async' key in the PSGI env hash.
+# The name of this key is not even stable!
+# Currently is is intended for use with read-only pipes.
 package PublicInbox::HTTPD::Async;
 use strict;
 use warnings;