Trees | Indices | Help |
|
---|
|
Drop-in replacement for the thread module.
Meant to be used as a brain-dead substitute so that threaded code does not need to be rewritten for when the thread module is not present.
Suggested usage is:
try: import thread except ImportError: import dummy_thread as thread
Author: Brett Cannon
|
|||
error Dummy implementation of thread.error. |
|||
LockType Class implementing dummy implementation of thread.LockType. |
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
|||
__email__ =
|
|||
_interrupt = False
|
|||
_main = True
|
Imports: _traceback, warnings
|
Dummy implementation of thread.start_new_thread(). Compatibility is maintained by making sure that ``args`` is a tuple and ``kwargs`` is a dictionary. If an exception is raised and it is SystemExit (which can be done by thread.exit()) it is caught and nothing is done; all other exceptions are printed out by using traceback.print_exc(). If the executed function calls interrupt_main the KeyboardInterrupt will be raised when the function returns. |
Dummy implementation of thread.get_ident(). Since this module should only be used when threadmodule is not available, it is safe to assume that the current process is the only thread. Thus a constant can be safely returned. |
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0 on Tue Jan 29 22:40:44 2008 | http://epydoc.sourceforge.net |