self.flush()
requests = [httpclient.HTTPRequest(url='http://httpbin.org/delay/' + str(
    delay), streaming_callback=self.on_chunk) for delay in [5, 4, 3, 2, 1]]
yield list(map(client.fetch, requests))
self.write('some closing')
self.finish()

def on_chunk(self, chunk):
    self.write('some chunk')
self.flush()
Tornado streaming HTTP response as AsyncHTTPClient receives chunks