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 carlosdf
Recipients carlosdf
Date 2009-08-23.17:46:27
SpamBayes Score 3.1878386e-05
Marked as misclassified No
Message-id <1251049590.58.0.809281249474.issue6766@psf.upfronthosting.co.za>
In-reply-to
Content
It's not possible to modify a dict inside a dict using a manager from 
multiprocessing.

Ex:

from multiprocessing import Process,Manager

def f(d):
    d['1'] = '1'
    d['2']['1'] = 'Try To Write'

if __name__ == '__main__':
    manager = Manager()

    d = manager.dict()

    d['2'] = manager.dict()

    print d

    p = Process(target=f, args=(d,))
    p.start()
    p.join()

    print d

    d['2'] = 5
    print d

The output Under Windows 7 (32 Bits) / Python 2.6.2 (32 Bits) is:

{'2': {}}
{'1': '1', '2': {}}
{'1': '1', '2': 5}

The output is the same if you change "d['2'] = manager.dict()" to 
"d['2'] = dict()"
History
Date User Action Args
2009-08-23 17:46:30carlosdfsetrecipients: + carlosdf
2009-08-23 17:46:30carlosdfsetmessageid: <1251049590.58.0.809281249474.issue6766@psf.upfronthosting.co.za>
2009-08-23 17:46:28carlosdflinkissue6766 messages
2009-08-23 17:46:27carlosdfcreate