Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-87135: threading.Lock: Raise rather than hang on Python finalization#135991

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
encukou merged 6 commits intopython:mainfromencukou:no-acquire-in-finalize
Jul 1, 2025
Merged
Show file tree
Hide file tree
Changes from1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
NextNext commit
Add docs
  • Loading branch information
@encukou
encukou committedJun 27, 2025
commit657c68dfd76e98a25e7dce2ec07f2d80e6a91f72
9 changes: 8 additions & 1 deletionDoc/library/exceptions.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -429,7 +429,9 @@ The following exceptions are the exceptions that are usually raised.

* Creating a new Python thread.
* :meth:`Joining <threading.Thread.join>` a running daemon thread.
* :func:`os.fork`.
* :func:`os.fork`,
* acquiring a lock such as :cls:`threading.Lock`, when it is known that
the operation would otherwise deadlock.

See also the :func:`sys.is_finalizing` function.

Expand All@@ -440,6 +442,11 @@ The following exceptions are the exceptions that are usually raised.

:meth:`threading.Thread.join` can now raise this exception.

.. versionchanged:: next

This exception may be raised when acquiring :meth:`threading.Lock`
or :meth:`threading.RLock`.

.. exception:: RecursionError

This exception is derived from :exc:`RuntimeError`. It is raised when the
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
Acquiring a :cls:`threading.Lock` or :cls:`threading.RLock` at interpreter
shutdown will raise :exc:`PythonFinalizationError` if Python can determine
that it would otherwise deadlock.

[8]ページ先頭

©2009-2025 Movatter.jp