[Python-checkins] cpython (merge 3.4 -> default): Document lock parameter for asyncio.Condition()
andrew.svetlov
python-checkins at python.org
Sat Jul 26 18:53:51 CEST 2014
http://hg.python.org/cpython/rev/c26e6beb2e35
changeset: 91889:c26e6beb2e35
parent: 91887:17f46a7b1125
parent: 91888:1e047b8f68cd
user: Andrew Svetlov <andrew.svetlov at gmail.com>
date: Sat Jul 26 19:53:38 2014 +0300
summary:
Document lock parameter for asyncio.Condition()
files:
Doc/library/asyncio-sync.rst | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/Doc/library/asyncio-sync.rst b/Doc/library/asyncio-sync.rst
--- a/Doc/library/asyncio-sync.rst
+++ b/Doc/library/asyncio-sync.rst
@@ -130,7 +130,7 @@
Condition
^^^^^^^^^
-.. class:: Condition(\*, loop=None)
+.. class:: Condition(lock=None, \*, loop=None)
A Condition implementation, asynchronous equivalent to
:class:`threading.Condition`.
@@ -139,7 +139,9 @@
allows one or more coroutines to wait until they are notified by another
coroutine.
- A new :class:`Lock` object is created and used as the underlying lock.
+ If the *lock* argument is given and not ``None``, it must be a :class:`Lock`
+ object, and it is used as the underlying lock. Otherwise,
+ a new :class:`Lock` object is created and used as the underlying lock.
.. method:: acquire()
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list