I guess not.. lock protects reference types

________________________________

From: [EMAIL PROTECTED] on behalf of Keith J. Farmer
Sent: Wed 5/11/2005 3:54 PM
To: Discussion of IronPython
Subject: RE: [IronPython] Array Access Problem


In the case of multi-threaded use, shouldn't valuetype modifications be locked 
to prevent simultaneous writes?  If so, couldn't IronPython encapsulate the 
change in a lock block in the background?

________________________________

From: [EMAIL PROTECTED] on behalf of Jim Hugunin
Sent: Wed 5/11/2005 2:34 PM
To: Discussion of IronPython
Subject: RE: [IronPython] Array Access Problem



> If so, what if another thread is concurrently modifying a different
> member of the underlying struct?

This is a good point.  In that case there is a potential difference
between my two examples above.  The one on the left can only change the
X part of the point, but the one on the right could in theory overwrite
another thread's changes to the Y part of the point.


<<winmail.dat>>

_______________________________________________
users-ironpython.com mailing list
users-ironpython.com@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to