[issue8055] Sleeping after acquiring RLock causes acquire to block in other thread

2010-03-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: You are just having wrong expectations. Releasing a lock doesn't guarantee that any other thread waiting on it will be scheduled preemptively. So, if you re-acquire the lock immediately, the other thread will not necessarily have had the opportunity of runnin

[issue8055] Sleeping after acquiring RLock causes acquire to block in other thread

2010-03-04 Thread Knut Eldhuset
New submission from Knut Eldhuset : In essence I have the following loop running in thread A: while True: with self.lock: time.sleep(0.1) I then try to acquire the lock in thread B. This blocks forever on Linux, but runs fine on Windows XP. The following modification makes the cod