Skip to content

Instantly share code, notes, and snippets.

@pmakholm
Created July 26, 2011 11:30
Show Gist options
  • Save pmakholm/1106536 to your computer and use it in GitHub Desktop.
Save pmakholm/1106536 to your computer and use it in GitHub Desktop.
Streaming PSGI with IO::AIO
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