summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Svetlov <andrew.svetlov@gmail.com>2014-07-26 16:53:38 (GMT)
committerAndrew Svetlov <andrew.svetlov@gmail.com>2014-07-26 16:53:38 (GMT)
commit83e6675c0d12609dbf37d7c032725cc3e6fc78ac (patch)
treec10b83ac4bb2cc6c558fe2991bb6889399ac9100
parent27a02111cf9653e1dcdcb41995602354346609ef (diff)
parentf200ce6333f410f32ae32a5cafbb0ac6c31999d9 (diff)
downloadcpython-83e6675c0d12609dbf37d7c032725cc3e6fc78ac.zip
cpython-83e6675c0d12609dbf37d7c032725cc3e6fc78ac.tar.gz
cpython-83e6675c0d12609dbf37d7c032725cc3e6fc78ac.tar.bz2
Document lock parameter for asyncio.Condition()
-rw-r--r--Doc/library/asyncio-sync.rst6
1 files changed, 4 insertions, 2 deletions
diff --git a/Doc/library/asyncio-sync.rst b/Doc/library/asyncio-sync.rst
index a299f09..049a0cc 100644
--- a/Doc/library/asyncio-sync.rst
+++ b/Doc/library/asyncio-sync.rst
@@ -130,7 +130,7 @@ Event
Condition
^^^^^^^^^
-.. class:: Condition(\*, loop=None)
+.. class:: Condition(lock=None, \*, loop=None)
A Condition implementation, asynchronous equivalent to
:class:`threading.Condition`.
@@ -139,7 +139,9 @@ Condition
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()