At Tuesday 5/12/2006 12:04, [EMAIL PROTECTED] wrote:

question about copy vs deepcopy used in multithreaded context:

suppose the following program below:

the original dictionary is modified after the thread is started, the thread works on a copied and deepcopied version of the original dictionary. Is the dictionary named "originalcopy" isolated from changes in original in multithreaded context?

The program reports no errors but I want to be really sure about this

For your simple test dictionary, copy and deepcopy behaves identically. If you wish, you should test using values that are containers themselves. With or without threads, modifying original (with the current contents) would never modify originalcopy neither originaldeepcopy, so you aren't testing anything here.
Try rewriting your test.


--
Gabriel Genellina
Softlab SRL
__________________________________________________
Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ¡gratis! ¡Abrí tu cuenta ya! - http://correo.yahoo.com.ar
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to