]> granicus.if.org Git - python/commitdiff
Document lock parameter for asyncio.Condition()
authorAndrew Svetlov <andrew.svetlov@gmail.com>
Sat, 26 Jul 2014 16:50:37 +0000 (19:50 +0300)
committerAndrew Svetlov <andrew.svetlov@gmail.com>
Sat, 26 Jul 2014 16:50:37 +0000 (19:50 +0300)
Doc/library/asyncio-sync.rst

index a299f09085e7aae8887ca73acea8e444cc8cb152..049a0cc5c43e6d2d138ff63a55fd775f7c23c025 100644 (file)
@@ -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()