Tornado 6.5 Documentation
convert_yielded(self.fetch_next_chunk()) while True: chunk = await fetch_future if chunk is None: break self.write(chunk) fetch_future = convert_yielded(self.fetch_next_chunk()) await self.flush() This is get(self): fetch_future = self.fetch_next_chunk() while True: chunk = yield fetch_future if chunk is None: break self.write(chunk) fetch_future = self.fetch_next_chunk() yield self.flush() Looping In native those methods are called, so the values are available during prepare. RequestHandler.data_received(chunk: bytes) → Awaitable[None] | None Implement this method to handle streamed request data. Requires0 码力 | 272 页 | 1.12 MB | 2 月前3Tornado 6.5 Documentation
fetch_next_chunk()) while True: chunk = await fetch_future if chunk is None: break self.write(chunk) fetch_future = convert_yielded(self.fetch_next_chunk()) fetch_future = self.fetch_next_chunk() while True: chunk = yield fetch_future if chunk is None: break self.write(chunk) fetch_future = self.fetch_next_chunk() yield self those methods are called, so the values are available during prepare. RequestHandler.data_received(chunk: bytes [https://docs.python.org/3/library/stdtypes.html#bytes]) → Awaitable [https://docs.python.0 码力 | 437 页 | 405.14 KB | 2 月前3
共 2 条
- 1
相关搜索词