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-88750: Remove the PYTHONTHREADDEBUG env var support.#92509

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
gpshead merged 2 commits intopython:mainfromgpshead:goodbye-threaddebug
May 9, 2022

Conversation

@gpshead
Copy link
Member

No description provided.

@gpsheadgpshead added the interpreter-core(Objects, Python, Grammar, and Parser dirs) labelMay 8, 2022
@gpsheadgpshead requested a review fromvstinnerMay 8, 2022 19:44
@gpshead
Copy link
MemberAuthor

gpshead commentedMay 8, 2022
edited
Loading

I left the emptydprintf macro definition and its uses in thePython/thread_*.h files. I figure those can be cleaned up in a separate commit.Update: Added another commit removing them.

@gpsheadgpshead linked an issueMay 8, 2022 that may beclosed by this pull request
@gpsheadgpshead self-assigned thisMay 8, 2022
Copy link
Member

@vstinnervstinner left a comment

Choose a reason for hiding this comment

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

LGTM.

My remark about PyThread_release_lock() is unrelated to your PR.


if (!(aLock&&LeaveNonRecursiveMutex((PNRMUTEX)aLock)))
dprintf(("%lu: Could not PyThread_release_lock(%p) error: %ld\n",PyThread_get_thread_ident(),aLock,GetLastError()));
if (aLock) {
Copy link
Member

Choose a reason for hiding this comment

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

Wait, we have a special case to do nothing if the lock is not initialized? Only for the Windows implementation and only for PyThread_release_lock()? That's weird. I suggest to replace the if() with an assert(), but done in a separated PR. (I can do it if I don't forget.)

It's weird because the pthread implement has no special case for PyThread_release_lock() and so the code is not portable. Or maybe I misunderstood something.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

I'd be surprised to ever see this called withaLock == NULL, I just figured I should preserve the exact semantics when removing the debug print. Agreed on the assert, but that does make more sense in a followup PR.

Copy link
Member

Choose a reason for hiding this comment

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

Sure. I created#92586

@gpsheadgpshead merged commit6ed7c35 intopython:mainMay 9, 2022
@gpsheadgpshead deleted the goodbye-threaddebug branchMay 9, 2022 23:03
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@vstinnervstinnervstinner approved these changes

Assignees

@gpsheadgpshead

Labels

interpreter-core(Objects, Python, Grammar, and Parser dirs)

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Deprecate thread debugging PYTHONTHREADDEBUG=1

3 participants

@gpshead@vstinner@bedevere-bot

[8]ページ先頭

©2009-2025 Movatter.jp