Tornado 6.5 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 码力 | 272 页 | 1.12 MB | 2 月前3Tornado 6.5 Documentation
concurrent web spider Structure of a Tornado web application The main coroutine The Application object Subclassing RequestHandler Handling request input Overriding RequestHandler methods Error Handling 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 via0 码力 | 437 页 | 405.14 KB | 2 月前3Rust 程序设计语言 简体中文版 1.85.0
语言中,有两个不同的运算符来调用方法:. 直接在对象上调用方法,而 -> 在一个对象的指针上调用方法,这时需要先解引用(dereference)指针。换句话 说,如果 object 是一个指针,那么 object->something() 就像 (*object).something() 一样。 110/562Rust 程序设计语言 简体中文版 Rust 并没有一个与 -> 等效的运算符;相反,Rust 有一个叫 referencing and dereferencing)的功能。方法调用是 Rust 中少数几个拥 有这种行为的地方。 它是这样工作的:当使用 object.something() 调用方法时,Rust 会自动为 object 添 加 &、&mut 或 * 以便使 object 与方法签名匹配。也就是说,这些代码是等价的: # # p1.distance(&p2); (&p1).distance(&p2); billion-dollar mistake. At that time, I was designing the first comprehensive type system for references in an object-oriented language. My goal was to ensure that all use of references should be absolutely safe, with0 码力 | 562 页 | 3.23 MB | 10 天前3
共 3 条
- 1