Author vstinner
Recipients thebits, vstinner
Date 2011-05-17.20:52:48
SpamBayes Score 5.20839e-06
Marked as misclassified No
Message-id <1305665568.88.0.847086568916.issue12098@psf.upfronthosting.co.za>
In-reply-to
Content
I'm unable to reproduce this bug on Linux.

$ cat script.py
from multiprocessing import Pool
import os

def myfunc(x):
    import sys
    print("child", os.getpid(), "optimize?", sys.flags.optimize)
    assert False, "assert False"
    return x

if __name__ == '__main__':
    import sys
    print("parent optimize?", sys.flags.optimize)
    pool = Pool(processes=2)
    pool.map(myfunc, xrange(2)) # or imap_unordered, map

$ python -O script.py
('parent optimize?', 1)
('child', 30397, 'optimize?', 1)
('child', 30398, 'optimize?', 1)
History
Date User Action Args
2011-05-17 20:52:49vstinnersetrecipients: + vstinner, thebits
2011-05-17 20:52:48vstinnersetmessageid: <1305665568.88.0.847086568916.issue12098@psf.upfronthosting.co.za>
2011-05-17 20:52:48vstinnerlinkissue12098 messages
2011-05-17 20:52:48vstinnercreate