blob: 30a3ebba6743c57c8ba538157be2409884311bce [file] [log] [blame]
Georg Brandl116aa622007-08-15 14:28:22 +00001:mod:`dummy_threading` --- Drop-in replacement for the :mod:`threading` module
2==============================================================================
3
4.. module:: dummy_threading
5 :synopsis: Drop-in replacement for the threading module.
6
Raymond Hettinger469271d2011-01-27 20:38:46 +00007**Source code:** :source:`Lib/dummy_threading.py`
8
9--------------
Georg Brandl116aa622007-08-15 14:28:22 +000010
11This module provides a duplicate interface to the :mod:`threading` module. It
Georg Brandl2067bfd2008-05-25 13:05:15 +000012is meant to be imported when the :mod:`_thread` module is not provided on a
Georg Brandl116aa622007-08-15 14:28:22 +000013platform.
14
15Suggested usage is::
16
17 try:
Georg Brandl2067bfd2008-05-25 13:05:15 +000018 import threading
Georg Brandl116aa622007-08-15 14:28:22 +000019 except ImportError:
Andrew Svetlova2568412012-10-09 13:44:16 +030020 import dummy_threading as threading
Georg Brandl116aa622007-08-15 14:28:22 +000021
Georg Brandl2067bfd2008-05-25 13:05:15 +000022Be 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.
Georg Brandl116aa622007-08-15 14:28:22 +000025