This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Misko Dzamba
Recipients Misko Dzamba
Date 2020-06-10.00:09:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1591747783.0.0.431376232538.issue40934@roundup.psfhosted.org>
In-reply-to
Content
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) ]))
History
Date User Action Args
2020-06-10 00:09:43Misko Dzambasetrecipients: + Misko Dzamba
2020-06-10 00:09:42Misko Dzambasetmessageid: <1591747783.0.0.431376232538.issue40934@roundup.psfhosted.org>
2020-06-10 00:09:42Misko Dzambalinkissue40934 messages
2020-06-10 00:09:41Misko Dzambacreate