ThinkSSL🔒 一键申购 5分钟快速签发 30天无理由退款 购买更放心 广告
### 导航 - [索引](../genindex.xhtml "总目录") - [模块](../py-modindex.xhtml "Python 模块索引") | - [下一页](dummy_threading.xhtml "dummy_threading --- 可直接替代 threading 模块。") | - [上一页](_thread.xhtml "_thread --- 底层多线程 API") | - ![](https://box.kancloud.cn/a721fc7ec672275e257bbbfde49a4d4e_16x16.png) - [Python](https://www.python.org/) » - zh\_CN 3.7.3 [文档](../index.xhtml) » - [Python 标准库](index.xhtml) » - [并发执行](concurrency.xhtml) » - $('.inline-search').show(0); | # [`_dummy_thread`](#module-_dummy_thread "_dummy_thread: Drop-in replacement for the _thread module.") --- [`_thread`](_thread.xhtml#module-_thread "_thread: Low-level threading API.") 的替代模块 **源代码:** [Lib/\_dummy\_thread.py](https://github.com/python/cpython/tree/3.7/Lib/_dummy_thread.py) \[https://github.com/python/cpython/tree/3.7/Lib/\_dummy\_thread.py\] 3\.7 版后已移除: Python 现在总是会启用多线程。请改用 [`_thread`](_thread.xhtml#module-_thread "_thread: Low-level threading API.") (或者用 [`threading`](threading.xhtml#module-threading "threading: Thread-based parallelism.") 更好)。 - - - - - - 这个模块提供与 [`_thread`](_thread.xhtml#module-_thread "_thread: Low-level threading API.") 相同的接口。它主要用于在没有提供 [`_thread`](_thread.xhtml#module-_thread "_thread: Low-level threading API.") 模块的平台上被导入。 如果线程需要阻塞等待另一个线程被创建的话,可能会造成死锁,这通常是由于阻塞 I/O 引起的。这种场景下请不要使用这个模块。 ### 导航 - [索引](../genindex.xhtml "总目录") - [模块](../py-modindex.xhtml "Python 模块索引") | - [下一页](dummy_threading.xhtml "dummy_threading --- 可直接替代 threading 模块。") | - [上一页](_thread.xhtml "_thread --- 底层多线程 API") | - ![](https://box.kancloud.cn/a721fc7ec672275e257bbbfde49a4d4e_16x16.png) - [Python](https://www.python.org/) » - zh\_CN 3.7.3 [文档](../index.xhtml) » - [Python 标准库](index.xhtml) » - [并发执行](concurrency.xhtml) » - $('.inline-search').show(0); | © [版权所有](../copyright.xhtml) 2001-2019, Python Software Foundation. Python 软件基金会是一个非盈利组织。 [请捐助。](https://www.python.org/psf/donations/) 最后更新于 5月 21, 2019. [发现了问题](../bugs.xhtml)? 使用[Sphinx](http://sphinx.pocoo.org/)1.8.4 创建。