~ubuntu-branches/ubuntu/trusty/python3.4/trusty-proposed

« back to all changes in this revision

Viewing changes to Doc/library/dummy_threading.rst

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2013-11-25 09:44:27 UTC
  • Revision ID: package-import@ubuntu.com-20131125094427-lzxj8ap5w01lmo7f
Tags: upstream-3.4~b1
ImportĀ upstreamĀ versionĀ 3.4~b1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
:mod:`dummy_threading` --- Drop-in replacement for the :mod:`threading` module
 
2
==============================================================================
 
3
 
 
4
.. module:: dummy_threading
 
5
   :synopsis: Drop-in replacement for the threading module.
 
6
 
 
7
**Source code:** :source:`Lib/dummy_threading.py`
 
8
 
 
9
--------------
 
10
 
 
11
This module provides a duplicate interface to the :mod:`threading` module.  It
 
12
is meant to be imported when the :mod:`_thread` module is not provided on a
 
13
platform.
 
14
 
 
15
Suggested usage is::
 
16
 
 
17
   try:
 
18
       import threading
 
19
   except ImportError:
 
20
       import dummy_threading as threading
 
21
 
 
22
Be careful to not use this module where deadlock might occur from a thread being
 
23
created that blocks waiting for another thread to be created.  This often occurs
 
24
with blocking I/O.
 
25