|
54 | 54 | Locks also support the context management protocol. ``(yield from lock)`` |
55 | 55 | should be used as context manager expression. |
56 | 56 |
|
| 57 | + This class is :ref:`not thread safe <asyncio-multithreading>`. |
| 58 | + |
57 | 59 | Usage:: |
58 | 60 |
|
59 | 61 | lock = Lock() |
@@ -117,6 +119,8 @@ Event |
117 | 119 | method. The :meth:`wait` method blocks until the flag is true. The flag is |
118 | 120 | initially false. |
119 | 121 |
|
| 122 | + This class is :ref:`not thread safe <asyncio-multithreading>`. |
| 123 | + |
120 | 124 | .. method:: clear() |
121 | 125 |
|
122 | 126 | Reset the internal flag to false. Subsequently, coroutines calling |
@@ -160,6 +164,8 @@ Condition |
160 | 164 | object, and it is used as the underlying lock. Otherwise, |
161 | 165 | a new :class:`Lock` object is created and used as the underlying lock. |
162 | 166 |
|
| 167 | + This class is :ref:`not thread safe <asyncio-multithreading>`. |
| 168 | + |
163 | 169 | .. coroutinemethod:: acquire() |
164 | 170 |
|
165 | 171 | Acquire the underlying lock. |
@@ -252,6 +258,8 @@ Semaphore |
252 | 258 | defaults to ``1``. If the value given is less than ``0``, :exc:`ValueError` |
253 | 259 | is raised. |
254 | 260 |
|
| 261 | + This class is :ref:`not thread safe <asyncio-multithreading>`. |
| 262 | + |
255 | 263 | .. coroutinemethod:: acquire() |
256 | 264 |
|
257 | 265 | Acquire a semaphore. |
@@ -279,8 +287,8 @@ BoundedSemaphore |
279 | 287 |
|
280 | 288 | .. class:: BoundedSemaphore(value=1, \*, loop=None) |
281 | 289 |
|
282 | | - A bounded semaphore implementation. Inherit from :class:`Semaphore`. |
| 290 | + A bounded semaphore implementation. Inherit from :class:`Semaphore`. |
283 | 291 |
|
284 | | - This raises :exc:`ValueError` in :meth:`~Semaphore.release` if it would |
285 | | - increase the value above the initial value. |
| 292 | + This raises :exc:`ValueError` in :meth:`~Semaphore.release` if it would |
| 293 | + increase the value above the initial value. |
286 | 294 |
|
0 commit comments