Thread-safe atomic operation

Dong-gweon Oh sadwolf at chollian.net
Tue Apr 11 08:02:28 CEST 2000


Is there any documents which describe Python's atomic operation in
multithreaded environment. I guess Python virtual instruction is atomic.
But, without definitive documentation in high level Python statements, I
tend to over-lock my programs.

Are these statements thread-safe?
1. import xxx
2. xxx = __import__('xxx')
3. reload(xxx)
4. dict['xxx'] = sys.modules['xxx']
5. dict.has_key('xxx')

Thanks,

Dong-gweon Oh







More information about the Python-list mailing list