Tornado 4.5 Documentation
Queue example - a concurrent web spider Structure of a Tornado web application The Application object Subclassing RequestHandler Handling request input Overriding RequestHandler methods Error Handling function definition with the @gen.coroutine decorator, and await in place of yield. The rest of this document still uses the yield style for compatibility with older versions of Python, but async and await containing yield is a generator. All generators are asynchronous; when called they return a generator object instead of running to completion. The @gen.coroutine decorator communicates with the generator via0 码力 | 333 页 | 322.34 KB | 1 年前3
Tornado 4.5 Documentation
function definition with the @gen. coroutine decorator, and await in place of yield. The rest of this document still uses the yield style for compatibility with older versions of Python, but async and await containing yield is a generator. All generators are asynchronous; when called they return a generator object instead of running to completion. The @gen.coroutine decorator communicates with the generator via trace in # the logs. Note that this doesn't look like a normal call, since # we pass the function object to be called by the IOLoop. IOLoop.current().spawn_callback(divide, 1, 0) Using IOLoop.spawn_callback0 码力 | 222 页 | 833.04 KB | 1 年前3
Tornado 5.1 Documentation
tornado.gen.convert_yielded. • Decorated coroutines always return a Future object. Native coroutines return an awaitable object that is not a Future. In Tornado the two are mostly interchangeable. How containing yield is a generator. All generators are asynchronous; when called they return a generator object instead of running to completion. The @gen.coroutine decorator communicates with the generator via not raise exceptions in the normal way: any exception they raise will be trapped in the awaitable object until it is yielded. This means it is important to call coroutines in the right way, or you may have0 码力 | 243 页 | 895.80 KB | 1 年前3
Tornado 6.1 Documentation
native coroutines, use tornado.gen.convert_yielded. – always return a Future object. Native coroutines return an awaitable object that is not a Future. In Tornado the two are mostly interchangeable. How containing yield is a generator. All generators are asynchronous; when called they return a generator object instead of running to completion. The @gen.coroutine decorator communicates with the generator via not raise exceptions in the normal way: any exception they raise will be trapped in the awaitable object until it is yielded. This means it is important to call coroutines in the right way, or you may have0 码力 | 245 页 | 904.24 KB | 1 年前3
Tornado 6.0 Documentation
native coroutines, use tornado.gen.convert_yielded. – always return a Future object. Native coroutines return an awaitable object that is not a Future. In Tornado the two are mostly interchangeable. 16 Chapter containing yield is a generator. All generators are asynchronous; when called they return a generator object instead of running to completion. The @gen.coroutine decorator communicates with the generator via not raise exceptions in the normal way: any exception they raise will be trapped in the awaitable object until it is yielded. This means it is important to call coroutines in the right way, or you may have0 码力 | 245 页 | 885.76 KB | 1 年前3
Tornado 5.1 Documentation
Queue example - a concurrent web spider Structure of a Tornado web application The Application object Subclassing RequestHandler Handling request input Overriding RequestHandler methods Error Handling use tornado.gen.convert_yielded. Decorated coroutines always return a Future object. Native coroutines return an awaitable object that is not a Future. In Tornado the two are mostly interchangeable. How containing yield is a generator. All generators are asynchronous; when called they return a generator object instead of running to completion. The @gen.coroutine decorator communicates with the generator via0 码力 | 359 页 | 347.32 KB | 1 年前3
Tornado 6.5 Documentationnative coroutines, use tornado.gen.convert_yielded. – always return a Future object. Native coroutines return an awaitable object that is not a Future. In Tornado the two are mostly interchangeable. 16 Chapter containing yield is a generator. All generators are asynchronous; when called they return a generator object instead of running to completion. The @gen.coroutine decorator communicates with the generator via not raise exceptions in the normal way: any exception they raise will be trapped in the awaitable object until it is yielded. This means it is important to call coroutines in the right way, or you may have0 码力 | 272 页 | 1.12 MB | 3 月前3
Tornado 6.4 Documentation
native coroutines, use tornado.gen.convert_yielded. – always return a Future object. Native coroutines return an awaitable object that is not a Future. In Tornado the two are mostly interchangeable. 16 Chapter containing yield is a generator. All generators are asynchronous; when called they return a generator object instead of running to completion. The @gen.coroutine decorator communicates with the generator via not raise exceptions in the normal way: any exception they raise will be trapped in the awaitable object until it is yielded. This means it is important to call coroutines in the right way, or you may have0 码力 | 268 页 | 1.09 MB | 1 年前3
Tornado 6.4 Documentation
native coroutines, use tornado.gen.convert_yielded. – always return a Future object. Native coroutines return an awaitable object that is not a Future. In Tornado the two are mostly interchangeable. 16 Chapter containing yield is a generator. All generators are asynchronous; when called they return a generator object instead of running to completion. The @gen.coroutine decorator communicates with the generator via not raise exceptions in the normal way: any exception they raise will be trapped in the awaitable object until it is yielded. This means it is important to call coroutines in the right way, or you may have0 码力 | 268 页 | 1.09 MB | 1 年前3
Tornado 6.4 Documentation
native coroutines, use tornado.gen.convert_yielded. – always return a Future object. Native coroutines return an awaitable object that is not a Future. In Tornado the two are mostly interchangeable. 16 Chapter containing yield is a generator. All generators are asynchronous; when called they return a generator object instead of running to completion. The @gen.coroutine decorator communicates with the generator via not raise exceptions in the normal way: any exception they raise will be trapped in the awaitable object until it is yielded. This means it is important to call coroutines in the right way, or you may have0 码力 | 268 页 | 1.09 MB | 1 年前3
共 20 条
- 1
- 2













