[jifty-devel] $m->flush_buffer question
Thomas Sibley
trs at bestpractical.com
Mon Jul 11 18:03:09 EDT 2011
On 07/11/2011 05:43 PM, Thomas Sibley wrote:
> on 'streamy' => stream {
> return sub {
> my $responder = shift;
> my $writer = $responder->(
> [200, ['Content-Type', 'text/plain']]
> );
> for my $i (1..10) {
> $writer->write("line $i\n");
> sleep 1;
> }
> $writer->close
> };
> };
For a general idea of what's going on here, it's based on the streamy
response logic:
http://beta.metacpan.org/module/PSGI#Delayed-Reponse-and-Streaming-Body
Thomas
More information about the jifty-devel
mailing list