Georg Brandl | 2067bfd | 2008-05-25 13:05:15 +0000 | [diff] [blame] | 1 | :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 | |
| 7 | |
| 8 | This module provides a duplicate interface to the :mod:`_thread` module. It is |
| 9 | meant to be imported when the :mod:`_thread` module is not provided on a |
| 10 | platform. |
| 11 | |
| 12 | Suggested usage is:: |
| 13 | |
| 14 | try: |
| 15 | import _thread |
| 16 | except ImportError: |
| 17 | import dummy_thread as _thread |
| 18 | |
| 19 | Be careful to not use this module where deadlock might occur from a thread being |
| 20 | created that blocks waiting for another thread to be created. This often occurs |
| 21 | with blocking I/O. |
| 22 | |