[IronPython] Interlocked methods and IronPython

Dan Eloff dan.eloff at gmail.com
Fri Nov 14 18:18:01 CET 2008


I've often wondered if the CLR Interlocked methods work with
IronPython. It seems that Interlocked.Increment works fine with module
globals (see attached script.) Whether it works fine in general I
don't know. Does anybody know anything about this?

-Dan

>ipy interlockedinc.py
UnsafeCount: -32081
SafeCount: 0

>ipy interlockedinc.py
UnsafeCount: -27749
SafeCount: 0

>ipy interlockedinc.py
UnsafeCount: -37339
SafeCount: 0

>ipy interlockedinc.py
UnsafeCount: -39461
SafeCount: 0

>ipy interlockedinc.py
UnsafeCount: 23175
SafeCount: 0
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: interlockedinc.py
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20081114/292c23c2/attachment.ksh>


More information about the Ironpython-users mailing list