From f200ce6333f410f32ae32a5cafbb0ac6c31999d9 Mon Sep 17 00:00:00 2001 From: Andrew Svetlov Date: Sat, 26 Jul 2014 19:50:37 +0300 Subject: [PATCH] Document lock parameter for asyncio.Condition() --- Doc/library/asyncio-sync.rst | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Doc/library/asyncio-sync.rst b/Doc/library/asyncio-sync.rst index a299f09085e..049a0cc5c43 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()