Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-43879: Add native_thread_id field to PyThreadState #25458

Merged

Conversation

@P403n1x87
Copy link
Contributor

@P403n1x87 P403n1x87 commented Apr 17, 2021

@the-knights-who-say-ni
Copy link

@the-knights-who-say-ni the-knights-who-say-ni commented Apr 17, 2021

Hello, and thanks for your contribution!

I'm a bot set up to make sure that the project can legally accept this contribution by verifying everyone involved has signed the PSF contributor agreement (CLA).

Recognized GitHub username

We couldn't find a bugs.python.org (b.p.o) account corresponding to the following GitHub usernames:

@P403n1x87

This might be simply due to a missing "GitHub Name" entry in one's b.p.o account settings. This is necessary for legal reasons before we can look at this contribution. Please follow the steps outlined in the CPython devguide to rectify this issue.

You can check yourself to see if the CLA has been received.

Thanks again for the contribution, we look forward to reviewing it!

@shreyanavigyan
Copy link
Contributor

@shreyanavigyan shreyanavigyan commented Apr 17, 2021

Hi...I think this change requires a news entry.

@P403n1x87 P403n1x87 force-pushed the P403n1x87:bpo-43879-add-native-thread-id-field branch from d815ed5 to 70380bb Apr 17, 2021
@@ -106,6 +106,7 @@ struct _ts {

PyObject *async_exc; /* Asynchronous exception to raise */
unsigned long thread_id; /* Thread id where this tstate was created */
unsigned long native_thread_id; /* Native thread id, when available */

This comment has been minimized.

@vstinner

vstinner May 14, 2021
Member

Please document the behavior when PyThread_get_thread_native_id() is not available (field set to 0 if I understand correctly). How can a dev know if the function is available? Is it ok to check if the PY_HAVE_THREAD_NATIVE_ID macro is defined?

The comment doesn't mention "where this tstate was created".

@P403n1x87 P403n1x87 force-pushed the P403n1x87:bpo-43879-add-native-thread-id-field branch from 70380bb to e507b83 May 14, 2021
@P403n1x87 P403n1x87 requested a review from vstinner May 14, 2021
@vstinner vstinner merged commit 90a6c07 into python:main May 26, 2021
12 checks passed
12 checks passed
@github-actions
Docs
Details
@github-actions
Check for source changes
Details
@github-actions
Check if generated files are up to date
Details
@github-actions
Windows (x86)
Details
@github-actions
Windows (x64)
Details
@github-actions
macOS
Details
@github-actions
Ubuntu
Details
@github-actions
Ubuntu SSL tests with OpenSSL (1.1.1k)
Details
@github-actions
Ubuntu SSL tests with OpenSSL (3.0.0-alpha16)
Details
@travis-ci
Travis CI - Pull Request Build Passed
Details
@bedevere-bot
bedevere/issue-number Issue number 43879 found
Details
@bedevere-bot
bedevere/news News entry found in Misc/NEWS.d
@vstinner
Copy link
Member

@vstinner vstinner commented May 26, 2021

Merged, thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants