[issue31977] threading.Condition can not work with threading.Semaphore

2017-11-09 Thread Antoine Pitrou
Change by Antoine Pitrou : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs

[issue31977] threading.Condition can not work with threading.Semaphore

2017-11-08 Thread Raymond Hettinger
Raymond Hettinger added the comment: I concur with Antoine and don't think there is a real issue here to be solved. -- nosy: +rhettinger ___ Python tracker ___

[issue31977] threading.Condition can not work with threading.Semaphore

2017-11-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: Why do you want Condition to work with a Semaphore? What would be achieved? A Semaphore is not a lock, it's an other kind of concurrency primitive. I don't think there's any point in detailing it any futrher. -- nosy: +pitrou, tim.peters __

[issue31977] threading.Condition can not work with threading.Semaphore

2017-11-07 Thread 张晓林
Change by 张晓林 : -- type: resource usage -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue31977] threading.Condition can not work with threading.Semaphore

2017-11-07 Thread 张晓林
New submission from 张晓林 : 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 _