Tornado 6.5 Documentation
6.5.1 The Tornado Authors May 22, 2025CONTENTS 1 Quick links 3 2 Hello, world 5 3 Threads and WSGI 7 4 asyncio Integration 9 5 Installation 11 6 Documentation 13 6.1 User’s guide . . . . . . . 5.1 6 Chapter 2. Hello, worldCHAPTER THREE THREADS AND WSGI Tornado is different from most Python web frameworks. It is not based on WSGI, and it is typically run with only one thread per process. for more on Tornado’s approach to asynchronous programming. While some support of WSGI is available in the tornado.wsgi module, it is not a focus of development and most applications should be written to0 码力 | 272 页 | 1.12 MB | 2 月前3Tornado 6.5 Documentation
com/tornadoweb/tornado/tree/stable/demos/chat]. Threads and WSGI Tornado is different from most Python web frameworks. It is not based on WSGI [https://wsgi.readthedocs.io/en/latest/], and it is typically run for more on Tornado’s approach to asynchronous programming. While some support of WSGI is available in the tornado.wsgi module, it is not a focus of development and most applications should be written to to use Tornado’s own interfaces (such as tornado.web) directly instead of using WSGI. In general, Tornado code is not thread-safe. The only method in Tornado that is safe to call from other threads is0 码力 | 437 页 | 405.14 KB | 2 月前3Python 标准库参考指南 2.7.18
—用于 CGI 脚本的回溯管理器 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 895 20.4 wsgiref —WSGI Utilities and Reference Implementation . . . . . . . . . . . . . . . . . . . . . . . 896 20.5 urllib Python Library Reference, 发布 2.7.18 注解: 通常来说,Pool 中的 Worker 进程的生命周期和进程池的工作队列一样长。一些其他系统中(如 Apache, mod_wsgi 等)也可以发现另一种模式,他们会让工作进程在完成一些任务后退出,清理、释放 资源,然后启动一个新的进程代替旧的工作进程。Pool 的 maxtasksperchild 参数给用户提供了这种能 力。 The Python Library Reference, 发布 2.7.18 20.4 wsgiref —WSGI Utilities and Reference Implementation 2.5 新版功能. The Web Server Gateway Interface (WSGI) is a standard interface between web server software0 码力 | 1552 页 | 7.42 MB | 9 月前3Python 标准库参考指南 2.7.18
—用于 CGI 脚本的回溯管理器 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 895 20.4 wsgiref —WSGI Utilities and Reference Implementation . . . . . . . . . . . . . . . . . . . . . . . 896 20.5 urllib Python Library Reference, 发布 2.7.18 注解: 通常来说,Pool 中的 Worker 进程的生命周期和进程池的工作队列一样长。一些其他系统中(如 Apache, mod_wsgi 等)也可以发现另一种模式,他们会让工作进程在完成一些任务后退出,清理、释放 资源,然后启动一个新的进程代替旧的工作进程。Pool 的 maxtasksperchild 参数给用户提供了这种能 力。 The Python Library Reference, 发布 2.7.18 20.4 wsgiref —WSGI Utilities and Reference Implementation 2.5 新版功能. The Web Server Gateway Interface (WSGI) is a standard interface between web server software0 码力 | 1552 页 | 7.42 MB | 9 月前3Python 标准库参考指南 2.7.18
—用于 CGI 脚本的回溯管理器 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 895 20.4 wsgiref —WSGI Utilities and Reference Implementation . . . . . . . . . . . . . . . . . . . . . . . 896 20.5 urllib Python Library Reference, 发布 2.7.18 注解: 通常来说,Pool 中的 Worker 进程的生命周期和进程池的工作队列一样长。一些其他系统中(如 Apache, mod_wsgi 等)也可以发现另一种模式,他们会让工作进程在完成一些任务后退出,清理、释放 资源,然后启动一个新的进程代替旧的工作进程。Pool 的 maxtasksperchild 参数给用户提供了这种能 力。 The Python Library Reference, 发布 2.7.18 20.4 wsgiref —WSGI Utilities and Reference Implementation 2.5 新版功能. The Web Server Gateway Interface (WSGI) is a standard interface between web server software0 码力 | 1552 页 | 7.42 MB | 9 月前3Python 标准库参考指南 3.6.15
—用于 CGI 脚本的回溯管理器 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1070 21.4 wsgiref —WSGI Utilities and Reference Implementation . . . . . . . . . . . . . . . . . . . . . . . 1071 21.5 urllib maxtasksperchild 3.4 新版功能: context 注解: 通常来说,Pool 中的 Worker 进程的生命周期和进程池的工作队列一样长。一些其他系统中(如 Apache, mod_wsgi 等)也可以发现另一种模式,他们会让工作进程在完成一些任务后退出,清理、释放 资源,然后启动一个新的进程代替旧的工作进程。Pool 的 maxtasksperchild 参数给用户提供了这种能 力。 互联网协议和支持 The Python Library Reference, 发布 3.6.15 21.4 wsgiref —WSGI Utilities and Reference Implementation The Web Server Gateway Interface (WSGI) is a standard interface between web server software and web0 码力 | 1886 页 | 8.95 MB | 9 月前3Python 标准库参考指南 3.6.15
—用于 CGI 脚本的回溯管理器 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1070 21.4 wsgiref —WSGI Utilities and Reference Implementation . . . . . . . . . . . . . . . . . . . . . . . 1071 21.5 urllib maxtasksperchild 3.4 新版功能: context 注解: 通常来说,Pool 中的 Worker 进程的生命周期和进程池的工作队列一样长。一些其他系统中(如 Apache, mod_wsgi 等)也可以发现另一种模式,他们会让工作进程在完成一些任务后退出,清理、释放 资源,然后启动一个新的进程代替旧的工作进程。Pool 的 maxtasksperchild 参数给用户提供了这种能 力。 互联网协议和支持 The Python Library Reference, 发布 3.6.15 21.4 wsgiref —WSGI Utilities and Reference Implementation The Web Server Gateway Interface (WSGI) is a standard interface between web server software and web0 码力 | 1886 页 | 8.95 MB | 9 月前3Python 标准库参考指南 3.7.13
用于 CGI 脚本的回溯管理器 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1057 22.4 wsgiref --- WSGI 工具和引用的实现 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1058 22.5 urllib --- URL 处理模块 maxtasksperchild 3.4 新版功能: context 注解: 通常来说,Pool 中的 Worker 进程的生命周期和进程池的工作队列一样长。一些其他系统中 (如 Apache, mod_wsgi 等)也可以发现另一种模式,他们会让工作进程在完成一些任务后退出,清 理、释放资源,然后启动一个新的进程代替旧的工作进程。Pool 的 maxtasksperchild 参数给用户提 供了这种能力。 wsgiref --- WSGI 工具和引用的实现 Web 服务器网关接口(WSGI)是 Web 服务器软件和用 Python 编写的 Web 应用程序之间的标准接口。具 有标准接口能够让支持 WSGI 的应用程序与多种不同的 Web 服务器配合使用。 只有 Web 服务器和编程框架的开发者才需要了解 WSGI 设计的每个细节和边界情况。你不需要了解 WSGI 的每个细节而只需要安装一个 WSGI 应用程序或编写使用现有框架的0 码力 | 1846 页 | 9.09 MB | 9 月前3Python 标准库参考指南 3.7.13
CGI 脚本的回溯管理器 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1120 22.4 wsgiref --- WSGI 工具和引用的实现 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1121 22.5 urllib --- URL maxtasksperchild 3.4 新版功能: context 注解: 通常来说,Pool 中的 Worker 进程的生命周期和进程池的工作队列一样长。一些其他系统中(如 Apache, mod_wsgi 等)也可以发现另一种模式,他们会让工作进程在完成一些任务后退出,清理、释放 资源,然后启动一个新的进程代替旧的工作进程。Pool 的 maxtasksperchild 参数给用户提供了这种能 力。 wsgiref --- WSGI 工具和引用的实现 Web 服务器网关接口(WSGI)是 Web 服务器软件和用 Python 编写的 Web 应用程序之间的标准接口。具有 标准接口能够让支持 WSGI 的应用程序与多种不同的 Web 服务器配合使用。 只有 Web 服务器和编程框架的开发者才需要了解 WSGI 设计的每个细节和边界情况。你不需要了解 WSGI 的每个细节而只需要安装一个 WSGI 应用程序或编写使用现有框架的0 码力 | 1961 页 | 9.14 MB | 9 月前3Python 标准库参考指南 3.8.20
CGI 脚本的回溯管理器 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1186 21.4 wsgiref --- WSGI 工具和参考实现 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1187 21.5 urllib --- URL maxtasksperchild 3.4 新版功能: context 注解: 通常来说,Pool 中的 Worker 进程的生命周期和进程池的工作队列一样长。一些其他系统中 (如 Apache, mod_wsgi 等)也可以发现另一种模式,他们会让工作进程在完成一些任务后退出,清理、 释放资源,然后启动一个新的进程代替旧的工作进程。Pool 的 maxtasksperchild 参数给用户提供了这 种能力。 preexec_fn 形 参 在 子 解 释 器 中 已 不 再 受 支 持。 在 子 解 释 器 中 使 用 此 形 参 将 引 发RuntimeError。这个新限制可能会影响部署在 mod_wsgi, uWSGI 和其他嵌入式环境中的应用。 如果 close_fds 为真,所有文件描述符除了 0, 1, 2 之外都会在子进程执行前关闭。而当 close_fds 为假时, 文件描述符遵守它们继承的标志,如文件描述符的继承0 码力 | 2052 页 | 9.74 MB | 9 月前3
共 33 条
- 1
- 2
- 3
- 4