[IronPython] Array Access Problem

Keith J. Farmer kfarmer at thuban.org
Wed May 11 16:03:48 PDT 2005


I guess not.. lock protects reference types

________________________________

From: users-ironpython.com-bounces at lists.ironpython.com 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: users-ironpython.com-bounces at lists.ironpython.com 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.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/ms-tnef
Size: 4058 bytes
Desc: not available
Url : http://listserver.dreamhost.com/pipermail/users-ironpython.com/attachments/20050511/779a9a3a/attachment-0001.bin


More information about the users-ironpython.com mailing list