GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-104341: Add a Separate "Running" Lock for Each Thread by ericsnowcurrently · Pull Request #104754 · python/cpython

Conversation

@ericsnowcurrently

@ericsnowcurrently ericsnowcurrently commented May 22, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

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.)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@ericsnowcurrently
Add a separate "running" lock for each thread.
2d4f12b
@ericsnowcurrently ericsnowcurrently added the skip news label May 22, 2023
@bedevere-bot bedevere-bot added the awaiting core review label May 22, 2023
@bedevere-bot bedevere-bot mentioned this pull request May 22, 2023
test__xxsubinterpreters is Occasionally Crashing #104341
Closed
ericsnowcurrently added 3 commits May 22, 2023 15:21
@ericsnowcurrently
test_tstate_lock -> test_running_lock.
79942af
@ericsnowcurrently
Merge branch 'main' into threading-running-lock
a1c2ca1
@ericsnowcurrently
Merge branch 'main' into threading-running-lock
55c0a06
@ericsnowcurrently ericsnowcurrently added the needs backport to 3.12 only security fixes label May 23, 2023
@ericsnowcurrently
ericsnowcurrently merged commit 097b783 into python:main May 23, 2023
@bedevere-bot bedevere-bot removed the awaiting core review label May 23, 2023
@miss-islington

miss-islington commented May 23, 2023

Copy link
Copy Markdown
Contributor

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

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

bedevere-bot commented May 23, 2023

Copy link
Copy Markdown

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

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

terryjreedy commented May 24, 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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

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

ericsnowcurrently commented May 24, 2023

Copy link
Copy Markdown
Member Author

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@gpshead

gpshead commented May 24, 2023

Copy link
Copy Markdown
Member

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@gpshead gpshead mentioned this pull request May 24, 2023
CI blocked: threading causing random tests to alter the execution environment and fail #104837
Closed
gpshead added a commit to gpshead/cpython that referenced this pull request May 24, 2023
@gpshead
pythongh-104837: Revert "pythongh-104341: Add a Separate "Running" Lo…
5ceae3c
…ck for Each Thread (pythongh-104754)"

This reverts commit 097b783.
@gpshead gpshead mentioned this pull request May 24, 2023
gh-104837: Revert "gh-104341: Add a Separate "Running" Lock for Each Thread (gh-104754) #104838
Merged
gpshead added a commit that referenced this pull request May 24, 2023
@gpshead
gh-104837: Revert "gh-104341: Add a Separate "Running" Lock for Each …
4b56e56
…Thread (gh-104754) (#104838)

gh-104837: Revert "gh-104341: Add a Separate "Running" Lock for Each Thread (gh-104754)"

This reverts commit 097b783.
@gpshead

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ericsnowcurrently

ericsnowcurrently commented May 24, 2023

Copy link
Copy Markdown
Member Author

thanks

gpshead reacted with heart emoji
All reactions
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ericsnowcurrently ericsnowcurrently mentioned this pull request Jun 5, 2023
Threading running lock #105334
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

skip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@ericsnowcurrently @miss-islington @bedevere-bot @terryjreedy @gpshead
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.