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

Update _threadmodule.c #17116

Closed
wants to merge 1 commit into from
Closed

Update _threadmodule.c #17116

wants to merge 1 commit into from

Conversation

toywei
Copy link

@toywei toywei commented Nov 12, 2019

cpuNum>1 ,rlock_count<0

cpuNum>1 ,rlock_count<0
@brandtbucher
Copy link
Member

Thanks for the PR @toywei!

Since these changes touch live code, though, this should have a BPO issue and a NEWS entry.

Copy link
Member

@brandtbucher brandtbucher left a comment

Choose a reason for hiding this comment

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

I'm a bit confused. Do you have a specific bug you can show us that's fixed by this?

@@ -347,7 +347,7 @@ rlock_release(rlockobject *self, PyObject *Py_UNUSED(ignored))
{
unsigned long tid = PyThread_get_thread_ident();

if (self->rlock_count == 0 || self->rlock_owner != tid) {
if (self->rlock_count <= 0 || self->rlock_owner != tid) {
Copy link
Member

Choose a reason for hiding this comment

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

rlock_count is an unsigned long here, so I can't see why this change would be necessary.

@csabella
Copy link
Contributor

I'm going to close this as the code review and the request for a bpo ticket hasn't been addressed. This can be reopened if the original author is interested in addressing the review. Thank you!

@csabella csabella closed this Jan 11, 2020
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.

None yet

5 participants