Message91889
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()" |
|
Date |
User |
Action |
Args |
2009-08-23 17:46:30 | carlosdf | set | recipients:
+ carlosdf |
2009-08-23 17:46:30 | carlosdf | set | messageid: <1251049590.58.0.809281249474.issue6766@psf.upfronthosting.co.za> |
2009-08-23 17:46:28 | carlosdf | link | issue6766 messages |
2009-08-23 17:46:27 | carlosdf | create | |
|