summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorBrett Cannon <bcannon@gmail.com>2008-05-08 18:55:02 (GMT)
committerBrett Cannon <bcannon@gmail.com>2008-05-08 18:55:02 (GMT)
commitd7cce26f7c71e3b2ba14198e93b28c4054bd7aea (patch)
treeb11745b87d682e4c094021ecfbea0b8514df455b /Doc
parent39143f8156e7423842f073c868b8d03eb649ce26 (diff)
downloadcpython-d7cce26f7c71e3b2ba14198e93b28c4054bd7aea.zip
cpython-d7cce26f7c71e3b2ba14198e93b28c4054bd7aea.tar.gz
cpython-d7cce26f7c71e3b2ba14198e93b28c4054bd7aea.tar.bz2
Remove the mutex module.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/datatypes.rst1
-rw-r--r--Doc/library/mutex.rst63
-rw-r--r--Doc/library/threading.rst2
3 files changed, 1 insertions, 65 deletions
diff --git a/Doc/library/datatypes.rst b/Doc/library/datatypes.rst
index ae76e72..f561cb8 100644
--- a/Doc/library/datatypes.rst
+++ b/Doc/library/datatypes.rst
@@ -26,7 +26,6 @@ The following modules are documented in this chapter:
bisect.rst
array.rst
sched.rst
- mutex.rst
queue.rst
weakref.rst
types.rst
diff --git a/Doc/library/mutex.rst b/Doc/library/mutex.rst
deleted file mode 100644
index 151f0c1..0000000
--- a/Doc/library/mutex.rst
+++ /dev/null
@@ -1,63 +0,0 @@
-
-:mod:`mutex` --- Mutual exclusion support
-=========================================
-
-.. module:: mutex
- :synopsis: Lock and queue for mutual exclusion.
-.. sectionauthor:: Moshe Zadka <moshez@zadka.site.co.il>
-
-
-The :mod:`mutex` module defines a class that allows mutual-exclusion via
-acquiring and releasing locks. It does not require (or imply)
-:mod:`threading` or multi-tasking, though it could be useful for those
-purposes.
-
-The :mod:`mutex` module defines the following class:
-
-
-.. class:: mutex()
-
- Create a new (unlocked) mutex.
-
- A mutex has two pieces of state --- a "locked" bit and a queue. When the mutex
- is not locked, the queue is empty. Otherwise, the queue contains zero or more
- ``(function, argument)`` pairs representing functions (or methods) waiting to
- acquire the lock. When the mutex is unlocked while the queue is not empty, the
- first queue entry is removed and its ``function(argument)`` pair called,
- implying it now has the lock.
-
- Of course, no multi-threading is implied -- hence the funny interface for
- :meth:`lock`, where a function is called once the lock is acquired.
-
-
-.. _mutex-objects:
-
-Mutex Objects
--------------
-
-:class:`mutex` objects have following methods:
-
-
-.. method:: mutex.test()
-
- Check whether the mutex is locked.
-
-
-.. method:: mutex.testandset()
-
- "Atomic" test-and-set, grab the lock if it is not set, and return ``True``,
- otherwise, return ``False``.
-
-
-.. method:: mutex.lock(function, argument)
-
- Execute ``function(argument)``, unless the mutex is locked. In the case it is
- locked, place the function and argument on the queue. See :meth:`unlock` for
- explanation of when ``function(argument)`` is executed in that case.
-
-
-.. method:: mutex.unlock()
-
- Unlock the mutex if queue is empty, otherwise execute the first element in the
- queue.
-
diff --git a/Doc/library/threading.rst b/Doc/library/threading.rst
index 3f62e69..dd67d48 100644
--- a/Doc/library/threading.rst
+++ b/Doc/library/threading.rst
@@ -8,7 +8,7 @@
This module constructs higher-level threading interfaces on top of the lower
level :mod:`thread` module.
-See also the :mod:`mutex` and :mod:`Queue` modules.
+See also the :mod:`Queue` module.
The :mod:`dummy_threading` module is provided for situations where
:mod:`threading` cannot be used because :mod:`thread` is missing.