summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2015-02-26 09:39:31 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2015-02-26 09:39:31 (GMT)
commit87f50158ee72bb2ff29c5f44f0b0efbb83845d46 (patch)
tree2d7661df1281ae6b896d8931dfbd527ffdd99e1d /Doc
parentf63dab5a842df7349af73be23fb3acc37aa75703 (diff)
parent7b2c3c6840052ea6f8b41253faf38b9e24f9a453 (diff)
downloadcpython-87f50158ee72bb2ff29c5f44f0b0efbb83845d46.zip
cpython-87f50158ee72bb2ff29c5f44f0b0efbb83845d46.tar.gz
cpython-87f50158ee72bb2ff29c5f44f0b0efbb83845d46.tar.bz2
Merge 3.4 (asyncio doc)
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/asyncio-sync.rst14
1 files changed, 11 insertions, 3 deletions
diff --git a/Doc/library/asyncio-sync.rst b/Doc/library/asyncio-sync.rst
index f53c7d0..622ff5fd 100644
--- a/Doc/library/asyncio-sync.rst
+++ b/Doc/library/asyncio-sync.rst
@@ -54,6 +54,8 @@ Lock
Locks also support the context management protocol. ``(yield from lock)``
should be used as context manager expression.
+ This class is :ref:`not thread safe <asyncio-multithreading>`.
+
Usage::
lock = Lock()
@@ -117,6 +119,8 @@ Event
method. The :meth:`wait` method blocks until the flag is true. The flag is
initially false.
+ This class is :ref:`not thread safe <asyncio-multithreading>`.
+
.. method:: clear()
Reset the internal flag to false. Subsequently, coroutines calling
@@ -160,6 +164,8 @@ Condition
object, and it is used as the underlying lock. Otherwise,
a new :class:`Lock` object is created and used as the underlying lock.
+ This class is :ref:`not thread safe <asyncio-multithreading>`.
+
.. coroutinemethod:: acquire()
Acquire the underlying lock.
@@ -252,6 +258,8 @@ Semaphore
defaults to ``1``. If the value given is less than ``0``, :exc:`ValueError`
is raised.
+ This class is :ref:`not thread safe <asyncio-multithreading>`.
+
.. coroutinemethod:: acquire()
Acquire a semaphore.
@@ -279,8 +287,8 @@ BoundedSemaphore
.. class:: BoundedSemaphore(value=1, \*, loop=None)
- A bounded semaphore implementation. Inherit from :class:`Semaphore`.
+ A bounded semaphore implementation. Inherit from :class:`Semaphore`.
- This raises :exc:`ValueError` in :meth:`~Semaphore.release` if it would
- increase the value above the initial value.
+ This raises :exc:`ValueError` in :meth:`~Semaphore.release` if it would
+ increase the value above the initial value.