[issue40934] Default RLock does not work well for Manager Condition
Misko Dzamba
report at bugs.python.org
Tue Jun 9 20:09:43 EDT 2020
New submission from Misko Dzamba <mouse9911 at gmail.com>:
I get unexpected behavior from Condition when using a Manager. I expected that if I call Condition.acquire() in one thread (or process) and then call .acquire() if another thread (or process) without first releasing the condition that it should block. However it seems like Condition.acquire() never blocks...
from multiprocessing import Pool,Manager
import time
def f(x):
cv,t=x
cv.acquire()
print(t,"Got cv")
return
if __name__ == '__main__':
m=Manager()
cv=m.Condition(m.RLock())
p = Pool(5)
print(p.map(f, [ (cv,x) for x in range(10) ]))
----------
messages: 371146
nosy: Misko Dzamba
priority: normal
severity: normal
status: open
title: Default RLock does not work well for Manager Condition
type: behavior
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40934>
_______________________________________
More information about the Python-bugs-list
mailing list