diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2014-09-10 20:45:42 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2014-09-10 20:45:42 (GMT) |
commit | dd6507eb8617fd435b9d282215f5d802bf45b64f (patch) | |
tree | cf585d874c0a58a84fadedfffd481d2aae924fce /Doc/library/threading.rst | |
parent | 9f69b86756bd7084256fda9499111313a081f033 (diff) | |
parent | 148679982f851e2952b9d34e6ae7932f89650c1d (diff) | |
download | cpython-dd6507eb8617fd435b9d282215f5d802bf45b64f.zip cpython-dd6507eb8617fd435b9d282215f5d802bf45b64f.tar.gz cpython-dd6507eb8617fd435b9d282215f5d802bf45b64f.tar.bz2 |
Issue #22369: Change "context manager protocol" to "context management protocol".
Diffstat (limited to 'Doc/library/threading.rst')
-rw-r--r-- | Doc/library/threading.rst | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Doc/library/threading.rst b/Doc/library/threading.rst index 03ee769..e7a3544 100644 --- a/Doc/library/threading.rst +++ b/Doc/library/threading.rst @@ -354,7 +354,7 @@ called in the locked state; it changes the state to unlocked and returns immediately. If an attempt is made to release an unlocked lock, a :exc:`RuntimeError` will be raised. -Locks also support the :ref:`context manager protocol <with-locks>`. +Locks also support the :ref:`context management protocol <with-locks>`. When more than one thread is blocked in :meth:`~Lock.acquire` waiting for the state to turn to unlocked, only one thread proceeds when a :meth:`~Lock.release` @@ -433,7 +433,7 @@ call pairs may be nested; only the final :meth:`~Lock.release` (the :meth:`~Lock.release` of the outermost pair) resets the lock to unlocked and allows another thread blocked in :meth:`~Lock.acquire` to proceed. -Reentrant locks also support the :ref:`context manager protocol <with-locks>`. +Reentrant locks also support the :ref:`context management protocol <with-locks>`. .. class:: RLock() @@ -501,7 +501,7 @@ passed in or one will be created by default. Passing one in is useful when several condition variables must share the same lock. The lock is part of the condition object: you don't have to track it separately. -A condition variable obeys the :ref:`context manager protocol <with-locks>`: +A condition variable obeys the :ref:`context management protocol <with-locks>`: using the ``with`` statement acquires the associated lock for the duration of the enclosed block. The :meth:`~Condition.acquire` and :meth:`~Condition.release` methods also call the corresponding methods of @@ -677,7 +677,7 @@ call. The counter can never go below zero; when :meth:`~Semaphore.acquire` finds that it is zero, it blocks, waiting until some other thread calls :meth:`~Semaphore.release`. -Semaphores also support the :ref:`context manager protocol <with-locks>`. +Semaphores also support the :ref:`context management protocol <with-locks>`. .. class:: Semaphore(value=1) |