[issue8055] Sleeping after acquiring RLock causes acquire to block in other thread
Antoine Pitrou
report at bugs.python.org
Thu Mar 4 16:51:33 CET 2010
Antoine Pitrou <pitrou at free.fr> 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 running at all. Whether or not threads do get switched at that point is highly system-dependent.
There are many synchronisation primitives you can use (locks, events, queues, condition variables...), each for a different purpose. I suggest you post on comp.lang.python if you want more help on the subject.
----------
resolution: -> invalid
status: open -> closed
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8055>
_______________________________________
More information about the Python-bugs-list
mailing list