Fred Drake | 740f800 | 2002-12-30 23:00:36 +0000 | [diff] [blame] | 1 | \section{\module{dummy_threading} --- |
Guido van Rossum | ad50ca9 | 2002-12-30 22:30:22 +0000 | [diff] [blame] | 2 | Drop-in replacement for the \module{threading} module} |
| 3 | |
| 4 | \declaremodule[dummythreading]{standard}{dummy_threading} |
Fred Drake | 740f800 | 2002-12-30 23:00:36 +0000 | [diff] [blame] | 5 | \modulesynopsis{Drop-in replacement for the \refmodule{threading} module.} |
Guido van Rossum | ad50ca9 | 2002-12-30 22:30:22 +0000 | [diff] [blame] | 6 | |
Fred Drake | 740f800 | 2002-12-30 23:00:36 +0000 | [diff] [blame] | 7 | This module provides a duplicate interface to the |
| 8 | \refmodule{threading} module. It is meant to be imported when the |
| 9 | \refmodule{thread} module is not provided on a platform. |
Guido van Rossum | ad50ca9 | 2002-12-30 22:30:22 +0000 | [diff] [blame] | 10 | |
| 11 | Suggested usage is: |
| 12 | |
| 13 | \begin{verbatim} |
| 14 | try: |
| 15 | import threading as _threading |
| 16 | except ImportError: |
| 17 | import dummy_threading as _threading |
| 18 | \end{verbatim} |
| 19 | |
| 20 | Be careful to not use this module where deadlock might occur from a thread |
| 21 | being created that blocks waiting for another thread to be created. This |
| 22 | often occurs with blocking I/O. |