Created
July 26, 2011 11:30
-
-
Save pmakholm/1106536 to your computer and use it in GitHub Desktop.
Streaming PSGI with IO::AIO
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
my $app = sub { | |
return sub { | |
my $response = shift; | |
my $writer = $response->( [ 200, [] ] ); | |
my $buffer = "a" x 1024; | |
$writer->write( $buffer ); | |
$buffer =~ y/a/b/; | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment