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

gh-104341: Add a Separate "Running" Lock for Each Thread by ericsnowcurrently · Pull Request #104754 · python/cpython · GitHub

/ cpython Public

gh-104341: Add a Separate "Running" Lock for Each Thread - #104754

Merged
ericsnowcurrently merged 4 commits into
python:mainfrom
ericsnowcurrently:threading-running-lock
May 23, 2023
Merged

gh-104341: Add a Separate "Running" Lock for Each Thread#104754
ericsnowcurrently merged 4 commits into
python:mainfrom
ericsnowcurrently:threading-running-lock

Conversation

ericsnowcurrently commented May 22, 2023
edited
Loading

Copy link
Copy Markdown
Member

Having a separate lock means Thread.join() doesn't need to wait for the thread to be cleaned up first. It can wait for the thread's Python target to finish running. This gives us some flexibility in how we clean up threads.

(This is a minor cleanup as part of a fix for gh-104341.)

ericsnowcurrently added the needs backport to 3.12 only security fixes label May 23, 2023
ericsnowcurrently merged commit 097b783 into python:main May 23, 2023

Copy link
Copy Markdown
Contributor

Thanks @ericsnowcurrently for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖

ericsnowcurrently deleted the threading-running-lock branch May 23, 2023 20:29

Copy link
Copy Markdown

GH-104817 is a backport of this pull request to the 3.12 branch.

bedevere-bot removed the needs backport to 3.12 only security fixes label May 23, 2023

Copy link
Copy Markdown
Member

This merge is likely the cause of multiple Address sanitizer CI failures afterwards. See the core discord, core-workflow-and-bots. For me, threading_cleanup left 2 dangling thread 4 times, once in test_importlib, making an Environment Change failure in 3 of 4 runs.

ericsnowcurrently restored the threading-running-lock branch May 24, 2023 04:40

Copy link
Copy Markdown
Member Author

I'll take a look first thing in the morning.

gpshead commented May 24, 2023

Copy link
Copy Markdown
Member

I'd revert this PR. This was not a "minor cleanup".

gpshead commented May 24, 2023

Copy link
Copy Markdown
Member

Reverted to unblock everybody else. Please do not make changes to threading without code review and buildbot tests.

Copy link
Copy Markdown
Member Author

thanks

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants


Back | FazBrowse Home | New Git URL