Tornado 6.1 Documentation
import tornado.ioloop import tornado.web class MainHandler(tornado.web.RequestHandler): def get(self): self.write("Hello, world") def make_app(): return tornado.web.Application([ you can start another operation before waiting. from tornado.gen import convert_yielded async def get(self): # convert_yielded() starts the native coroutine in the background. # This is equivalent easier to do with decorated coroutines, because they start immediately when called: @gen.coroutine def get(self): fetch_future = self.fetch_next_chunk() while True: chunk = yield fetch_future0 码力 | 931 页 | 708.03 KB | 1 年前3Tornado 6.0 Documentation
import tornado.ioloop import tornado.web class MainHandler(tornado.web.RequestHandler): def get(self): self.write("Hello, world") def make_app(): return tornado.web.Application([ you can start another operation before waiting. from tornado.gen import convert_yielded async def get(self): # convert_yielded() starts the native coroutine in the background. # This is equivalent easier to do with decorated coroutines, because they start immediately when called: @gen.coroutine def get(self): fetch_future = self.fetch_next_chunk() while True: chunk = yield fetch_future0 码力 | 869 页 | 692.83 KB | 1 年前3Tornado 6.5 Documentation
app for Tornado: import asyncio import tornado class MainHandler(tornado.web.RequestHandler): def get(self): self.write("Hello, world") def make_app(): return tornado.web.Application([ (r"/", MainHandler) you can start another operation before waiting. from tornado.gen import convert_yielded async def get(self): # convert_yielded() starts the native coroutine in the background. # This is equivalent to easier to do with decorated coroutines, because they start immediately when called: @gen.coroutine def get(self): fetch_future = self.fetch_next_chunk() while True: chunk = yield fetch_future if chunk is None:0 码力 | 272 页 | 1.12 MB | 2 月前3Tornado 6.1 Documentation
Tornado: import tornado.ioloop import tornado.web class MainHandler(tornado.web.RequestHandler): def get(self): self.write("Hello, world") def make_app(): return tornado.web.Application([ (r"/", MainHandler) you can start another operation before waiting. from tornado.gen import convert_yielded async def get(self): # convert_yielded() starts the native coroutine in the background. # This is equivalent to easier to do with decorated coroutines, because they start immediately when called: @gen.coroutine def get(self): fetch_future = self.fetch_next_chunk() while True: chunk = yield fetch_future if chunk is None:0 码力 | 245 页 | 904.24 KB | 1 年前3Tornado 5.1 Documentation
Tornado: import tornado.ioloop import tornado.web class MainHandler(tornado.web.RequestHandler): def get(self): self.write("Hello, world") def make_app(): return tornado.web.Application([ (r"/", MainHandler) you can start another operation before waiting. from tornado.gen import convert_yielded async def get(self): # convert_yielded() starts the native coroutine in the background. # This is equivalent to easier to do with decorated coroutines, because they start immediately when called: @gen.coroutine def get(self): fetch_future = self.fetch_next_chunk() while True: chunk = yield fetch_future if chunk is None:0 码力 | 243 页 | 895.80 KB | 1 年前3Tornado 6.4 Documentation
app for Tornado: import asyncio import tornado class MainHandler(tornado.web.RequestHandler): def get(self): self.write("Hello, world") def make_app(): return tornado.web.Application([ (r"/", MainHandler) you can start another operation before waiting. from tornado.gen import convert_yielded async def get(self): # convert_yielded() starts the native coroutine in the background. # This is equivalent to easier to do with decorated coroutines, because they start immediately when called: @gen.coroutine def get(self): fetch_future = self.fetch_next_chunk() while True: chunk = yield fetch_future if chunk is None:0 码力 | 268 页 | 1.09 MB | 1 年前3Tornado 6.4 Documentation
app for Tornado: import asyncio import tornado class MainHandler(tornado.web.RequestHandler): def get(self): self.write("Hello, world") def make_app(): return tornado.web.Application([ (r"/", MainHandler) you can start another operation before waiting. from tornado.gen import convert_yielded async def get(self): # convert_yielded() starts the native coroutine in the background. # This is equivalent to easier to do with decorated coroutines, because they start immediately when called: @gen.coroutine def get(self): fetch_future = self.fetch_next_chunk() while True: chunk = yield fetch_future if chunk is None:0 码力 | 268 页 | 1.09 MB | 1 年前3Tornado 6.4 Documentation
app for Tornado: import asyncio import tornado class MainHandler(tornado.web.RequestHandler): def get(self): self.write("Hello, world") def make_app(): return tornado.web.Application([ (r"/", MainHandler) you can start another operation before waiting. from tornado.gen import convert_yielded async def get(self): # convert_yielded() starts the native coroutine in the background. # This is equivalent to easier to do with decorated coroutines, because they start immediately when called: @gen.coroutine def get(self): fetch_future = self.fetch_next_chunk() while True: chunk = yield fetch_future if chunk is None:0 码力 | 268 页 | 1.09 MB | 1 年前3Tornado 4.5 Documentation
Tornado: import tornado.ioloop import tornado.web class MainHandler(tornado.web.RequestHandler): def get(self): self.write("Hello, world") def make_app(): return tornado.web.Application([ (r"/", MainHandler) of yielding it immediately, so you can start another operation before waiting: @gen.coroutine def get(self): fetch_future = self.fetch_next_chunk() while True: chunk = yield fetch_future if chunk is None: module. 4.1. User’s guide 15 Tornado Documentation, Release 4.5.3 A coroutine that yields Queue.get pauses until there is an item in the queue. If the queue has a maximum size set, a coroutine that yields0 码力 | 222 页 | 833.04 KB | 1 年前3Tornado 6.3 Documentation
app for Tornado: import asyncio import tornado class MainHandler(tornado.web.RequestHandler): def get(self): self.write("Hello, world") def make_app(): return tornado.web.Application([ (r"/", MainHandler) you can start another operation before waiting. from tornado.gen import convert_yielded async def get(self): # convert_yielded() starts the native coroutine in the background. # This is equivalent to easier to do with decorated coroutines, because they start immediately when called: @gen.coroutine def get(self): fetch_future = self.fetch_next_chunk() while True: chunk = yield fetch_future if chunk is None:0 码力 | 264 页 | 1.06 MB | 1 年前3
共 20 条
- 1
- 2