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
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