summaryrefslogtreecommitdiffstats
path: root/Doc/library/asyncio-sync.rst
diff options
context:
space:
mode:
authorElvis Pranskevichus <elvis@magic.io>2018-09-17 23:16:44 (GMT)
committerYury Selivanov <yury@magic.io>2018-09-17 23:16:44 (GMT)
commit1fa2ec49bec50bea1847b558b883c5c904334734 (patch)
tree41171f74e1a202048b6fad10295bacde5940dc52 /Doc/library/asyncio-sync.rst
parent3085534c398e6b181e7a9ac0cb9c80f3c670f2b9 (diff)
downloadcpython-1fa2ec49bec50bea1847b558b883c5c904334734.zip
cpython-1fa2ec49bec50bea1847b558b883c5c904334734.tar.gz
cpython-1fa2ec49bec50bea1847b558b883c5c904334734.tar.bz2
bpo-33649: A copy-editing pass on asyncio documentation (GH-9376)
Diffstat (limited to 'Doc/library/asyncio-sync.rst')
-rw-r--r--Doc/library/asyncio-sync.rst14
1 files changed, 7 insertions, 7 deletions
diff --git a/Doc/library/asyncio-sync.rst b/Doc/library/asyncio-sync.rst
index f299885..18b5629 100644
--- a/Doc/library/asyncio-sync.rst
+++ b/Doc/library/asyncio-sync.rst
@@ -10,10 +10,10 @@ asyncio synchronization primitives are designed to be similar to
those of the :mod:`threading` module with two important caveats:
* asyncio primitives are not thread-safe, therefore they should not
- be used for OS threads synchronization (use :mod:`threading` for
+ be used for OS thread synchronization (use :mod:`threading` for
that);
-* methods of synchronization primitives do not accept the *timeout*
+* methods of these synchronization primitives do not accept the *timeout*
argument; use the :func:`asyncio.wait_for` function to perform
operations with timeouts.
@@ -153,12 +153,12 @@ Condition
A Condition object. Not thread-safe.
An asyncio condition primitive can be used by a task to wait for
- some event to happen and then get an exclusive access to a shared
+ some event to happen and then get exclusive access to a shared
resource.
In essence, a Condition object combines the functionality
- of :class:`Event` and :class:`Lock`. It is possible to have many
- Condition objects sharing one Lock, which allows to coordinate
+ of an :class:`Event` and a :class:`Lock`. It is possible to have
+ multiple Condition objects share one Lock, which allows coordinating
exclusive access to a shared resource between different tasks
interested in particular states of that shared resource.
@@ -287,7 +287,7 @@ Semaphore
Acquire a semaphore.
If the internal counter is greater than zero, decrement
- it by one and return ``True`` immediately. If it is zero wait
+ it by one and return ``True`` immediately. If it is zero, wait
until a :meth:`release` is called and return ``True``.
.. method:: locked()
@@ -300,7 +300,7 @@ Semaphore
Can wake up a task waiting to acquire the semaphore.
Unlike :class:`BoundedSemaphore`, :class:`Semaphore` allows
- to make more ``release()`` calls than ``acquire()`` calls.
+ making more ``release()`` calls than ``acquire()`` calls.
BoundedSemaphore