[IronPython] Array Access Problem

Keith J. Farmer kfarmer at thuban.org
Thu May 12 00:54:08 CEST 2005

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: winmail.dat
Type: application/ms-tnef
Size: 3770 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20050511/acfaaf69/attachment.bin>

More information about the Ironpython-users mailing list