This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: rlock_count<0
Type: Stage: resolved
Components: Build Versions: Python 3.8
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: iritkatriel, toywei, vstinner
Priority: normal Keywords:

Created on 2019-11-12 10:00 by toywei, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (4)
msg356431 - (view) Author: toywei (toywei) * Date: 2019-11-12 10:00
Modules\_threadmodule.c
    if (self->rlock_count == 0 || self->rlock_owner != tid) {
==>
    if (self->rlock_count <= 0 || self->rlock_owner != tid) {
msg356433 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2019-11-12 10:06
Hello. Please elaborate your bug report. What is your problem? What are you trying to do? What is the current behavior?
msg377420 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2020-09-23 20:42
rlock_count is an unsigned long, so it can't be negative.
msg377423 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2020-09-23 21:24
> rlock_count is an unsigned long, so it can't be negative.

Right, so I don't see the point of replacing "== 0" with "<= 0".

I close the issue.
History
Date User Action Args
2022-04-11 14:59:23adminsetgithub: 82957
2020-09-23 21:24:58vstinnersetstatus: open -> closed
resolution: not a bug
messages: + msg377423

stage: resolved
2020-09-23 20:42:31iritkatrielsetnosy: + iritkatriel
messages: + msg377420
2019-11-12 10:06:18vstinnersetnosy: + vstinner
messages: + msg356433
2019-11-12 10:00:07toyweicreate