FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-117688: Fix deadlock in test_no_stale_references with GIL disabled by colesbury · Pull Request #117720 · python/cpython · GitHub

Repository navigation

gh-117688: Fix deadlock in test_no_stale_references with GIL disabled - #117720

Merged
colesbury merged 1 commit into
python:mainfrom
colesbury:gh-117688-test_no_stale_references
Apr 15, 2024
Merged

colesbury merged 1 commit into
python:mainfrom
colesbury:gh-117688-test_no_stale_references

Conversation

colesbury commented Apr 10, 2024 •
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Contributor

Check my_object_collected.wait() in a loop to give the main thread a
chance to merge the reference count fields. Additionally, call
my_object_collected.set() in a background thread to avoid deadlocking
when the destructor is called asynchronously via the eval breaker
within the body of of my_object_collected.wait().

Copy link
Copy Markdown
Member

Oh, I will take a look at it by tomorrow :) I need to read the details.

corona10 self-assigned this Apr 11, 2024

Copy link
Copy Markdown
Contributor Author

Thanks!

corona10 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM,
It is a complicated situation, and I can not find a better solution.

colesbury merged commit 520cf21 into python:main Apr 15, 2024
colesbury deleted the gh-117688-test_no_stale_references branch April 15, 2024 16:54
diegorusso pushed a commit to diegorusso/cpython that referenced this pull request Apr 17, 2024
…sabled (python#117720)

Check `my_object_collected.wait()` in a loop to give the main thread a
chance to merge the reference count fields. Additionally, call
`my_object_collected.set()` in a background thread to avoid deadlocking
when the destructor is called asynchronously via the eval breaker
within the body of of `my_object_collected.wait()`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL