/Doc/library/dummy_threading.rst

http://unladen-swallow.googlecode.com/ · ReStructuredText · 23 lines · 15 code · 8 blank · 0 comment · 0 complexity · d3d5ed98d273c8b01685dbdd6c522992 MD5 · raw file

  1. :mod:`dummy_threading` --- Drop-in replacement for the :mod:`threading` module
  2. ==============================================================================
  3. .. module:: dummy_threading
  4. :synopsis: Drop-in replacement for the threading module.
  5. This module provides a duplicate interface to the :mod:`threading` module. It
  6. is meant to be imported when the :mod:`thread` module is not provided on a
  7. platform.
  8. Suggested usage is::
  9. try:
  10. import threading as _threading
  11. except ImportError:
  12. import dummy_threading as _threading
  13. Be careful to not use this module where deadlock might occur from a thread
  14. being created that blocks waiting for another thread to be created. This often
  15. occurs with blocking I/O.