Message305807
the python document say Condition work will Locks, like RLock...
but i find it not work with Semaphore, because Condition._is_owned is like this
def _is_owned(self):
# Return True if lock is owned by current_thread.
# This method is called only if _lock doesn't have _is_owned().
if self._lock.acquire(0):
self._lock.release()
return False
else:
return True
this work for RLock, but not work for Semaphore, and Semaphore do not have it's own _is_owned implement.
i spend a lot of time on this issue. maybe fix it, or document it out? |
|
Date |
User |
Action |
Args |
2017-11-08 05:12:05 | 张晓林 | set | recipients:
+ 张晓林 |
2017-11-08 05:12:05 | 张晓林 | set | messageid: <1510117925.72.0.213398074469.issue31977@psf.upfronthosting.co.za> |
2017-11-08 05:12:05 | 张晓林 | link | issue31977 messages |
2017-11-08 05:12:05 | 张晓林 | create | |
|