[IronPython] Array Access Problem
Keith J. Farmer
kfarmer at thuban.org
Thu May 12 01:03:48 CEST 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: winmail.dat
Type: application/ms-tnef
Size: 4058 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20050511/779a9a3a/attachment.bin>
More information about the Ironpython-users
mailing list