mirror of
https://github.com/python/cpython.git
synced 2025-11-02 11:08:57 +00:00
Issue #8844: Regular and recursive lock acquisitions can now be interrupted
by signals on platforms using pthreads. Patch by Reid Kleckner.
This commit is contained in:
parent
119cda0fd2
commit
810023db3e
10 changed files with 298 additions and 71 deletions
|
|
@ -137,6 +137,10 @@ Lock objects have the following methods:
|
|||
.. versionchanged:: 3.2
|
||||
The *timeout* parameter is new.
|
||||
|
||||
.. versionchanged:: 3.2
|
||||
Lock acquires can now be interrupted by signals on POSIX.
|
||||
|
||||
|
||||
.. method:: lock.release()
|
||||
|
||||
Releases the lock. The lock must have been acquired earlier, but not
|
||||
|
|
|
|||
|
|
@ -408,6 +408,9 @@ All methods are executed atomically.
|
|||
.. versionchanged:: 3.2
|
||||
The *timeout* parameter is new.
|
||||
|
||||
.. versionchanged:: 3.2
|
||||
Lock acquires can now be interrupted by signals on POSIX.
|
||||
|
||||
|
||||
.. method:: Lock.release()
|
||||
|
||||
|
|
|
|||
|
|
@ -1212,6 +1212,12 @@ Multi-threading
|
|||
* Similarly, :meth:`threading.Semaphore.acquire` also gained a *timeout*
|
||||
argument. (Contributed by Torsten Landschoff; :issue:`850728`.)
|
||||
|
||||
* Regular and recursive lock acquisitions can now be interrupted by signals on
|
||||
platforms using pthreads. This means that Python programs that deadlock while
|
||||
acquiring locks can be successfully killed by repeatedly sending SIGINT to the
|
||||
process (ie, by pressing Ctl+C in most shells).
|
||||
(Contributed by Reid Kleckner; :issue:`8844`.)
|
||||
|
||||
|
||||
Optimizations
|
||||
=============
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue