Mercurial > cpython-lru_cache-weakref
diff Doc/lib/libdummythread.tex @ 26890:8053bc0b8bb5 legacy-trunk
Brett Cannon's dummy_thread and dummy_threading modules (SF patch
622537), with some nitpicking editorial changes.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Mon, 30 Dec 2002 22:30:22 +0000 |
| parents | |
| children | 3bc2af41c016 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Doc/lib/libdummythread.tex Mon Dec 30 22:30:22 2002 +0000 @@ -0,0 +1,22 @@ +\section{\module{dummy_thread} --- + Drop-in replacement for the \module{thread} module} + +\declaremodule[dummythread]{standard}{dummy_thread} +\modulesynopsis{Drop-in replacement for the thread module.} + +This module provides a duplicate interface to the \refmodule{thread} module. It +is meant to be imported when the \module{thread} module is not provided on a +platform. + +Suggested usage is: + +\begin{verbatim} +try: + import thread as _thread +except ImportError: + import dummy_thread as _thread +\end{verbatim} + +Be careful to not use this module where deadlock might occur from a thread +being created that blocks waiting for another thread to be created. This +often occurs with blocking I/O.
