企业🤖AI Agent构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
### 导航 - [索引](../genindex.xhtml "总目录") - [模块](../py-modindex.xhtml "Python 模块索引") | - [下一页](contextvars.xhtml "contextvars --- Context Variables") | - [上一页](_dummy_thread.xhtml "_dummy_thread --- _thread 的替代模块") | - ![](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_threading`](#module-dummy_threading "dummy_threading: Drop-in replacement for the threading module.") --- 可直接替代 [`threading`](threading.xhtml#module-threading "threading: Thread-based parallelism.") 模块。 **源代码:** [Lib/dummy\_threading.py](https://github.com/python/cpython/tree/3.7/Lib/dummy_threading.py) \[https://github.com/python/cpython/tree/3.7/Lib/dummy\_threading.py\] 3\.7 版后已移除: 现在Python总是启用多线程。请使用 [`threading`](threading.xhtml#module-threading "threading: Thread-based parallelism.") 代替。 - - - - - - 这个模块提供了一个和 [`threading`](threading.xhtml#module-threading "threading: Thread-based parallelism.") 模块重复的接口。当平台不提供 [`_thread`](_thread.xhtml#module-_thread "_thread: Low-level threading API.") 模块时,应导入这个模块。 如果线程需要阻塞等待另一个线程被创建的话,可能会造成死锁,这通常是由于阻塞 I/O 引起的。这种场景下请不要使用这个模块。 ### 导航 - [索引](../genindex.xhtml "总目录") - [模块](../py-modindex.xhtml "Python 模块索引") | - [下一页](contextvars.xhtml "contextvars --- Context Variables") | - [上一页](_dummy_thread.xhtml "_dummy_thread --- _thread 的替代模块") | - ![](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 创建。