blob: ebce74d5a2252f77b6c3f758919c177561acf5c3 [file] [log] [blame]
Georg Brandl2067bfd2008-05-25 13:05:15 +00001:mod:`_dummy_thread` --- Drop-in replacement for the :mod:`_thread` module
2==========================================================================
3
4.. module:: _dummy_thread
5 :synopsis: Drop-in replacement for the _thread module.
6
Raymond Hettinger3029aff2011-02-10 08:09:36 +00007**Source code:** :source:`Lib/_dummy_thread.py`
8
9--------------
Georg Brandl2067bfd2008-05-25 13:05:15 +000010
11This module provides a duplicate interface to the :mod:`_thread` module. It is
12meant to be imported when the :mod:`_thread` module is not provided on a
13platform.
14
15Suggested usage is::
16
17 try:
18 import _thread
19 except ImportError:
R David Murray041d5532013-02-09 13:23:46 -050020 import _dummy_thread as _thread
Georg Brandl2067bfd2008-05-25 13:05:15 +000021
22Be careful to not use this module where deadlock might occur from a thread being
23created that blocks waiting for another thread to be created. This often occurs
24with blocking I/O.
25