Tornado 6.5 Documentation
http_client = AsyncHTTPClient() response = await http_client.fetch(url) return response.body Or for compatibility with older versions of Python, using the tornado.gen module: 14 Chapter 6. DocumentationTornado and await keywords (functions using these keywords are also called “native corou- tines”). For compatibility with older versions of Python, you can use “decorated” or “yield-based” coroutines using the tornado Native coroutines are the recommended form whenever possible. Only use decorated coroutines when compatibility with older versions of Python is required. Examples in the Tornado documentation will generally0 码力 | 272 页 | 1.12 MB | 2 月前3Tornado 6.5 Documentation
AsyncHTTPClient() response = await http_client.fetch(url) return response.body Or for compatibility with older versions of Python, using the tornado.gen module: from tornado.httpclient import AsyncHTTPClient and await keywords (functions using these keywords are also called “native coroutines”). For compatibility with older versions of Python, you can use “decorated” or “yield-based” coroutines using the tornado Native coroutines are the recommended form whenever possible. Only use decorated coroutines when compatibility with older versions of Python is required. Examples in the Tornado documentation will generally0 码力 | 437 页 | 405.14 KB | 2 月前3Rust 程序设计语言 简体中文版 1.85.0
对象中的指针来知晓需要调用哪个方法。这种查找会带来在静态分发中不会产生的运行时开 销。动态分发也阻止编译器有选择地内联方法代码,这会相应地禁用一些优化,Rust 还定义 了一些规则,称为 dyn 兼容性(dyn compatibility),用于规定可以和不可以在哪些地方使用 动态分发。这些规则超出了本讨论范围,但你可以在参考资料中详细了解。尽管在编写示例 18-5 和可以支持示例 18-9 中的代码的过程中确实获得了额外的灵活性,但仍然需要权衡取0 码力 | 562 页 | 3.23 MB | 9 天前3
共 3 条
- 1