[Mono-list] Interlocked on a SMP machine

Alan McGovern alan.mcgovern at gmail.com
Fri Jun 22 11:49:18 EDT 2007

Can i see your testcase?


On 6/22/07, P. Oscar Boykin <oscar.boykin at gmail.com> wrote:
> I have some code that is implemented two ways.  Once using a standard
> lock, and once using System.Threading.Interlocked and no locks
> whatsoever.
> Both seem to function correctly, however, the Interlocked version
> seems to only use one CPU (my max CPU is 100%).  When using the lock
> based version, the CPU utilization goes to 200% (approximately).
> Thus, the lock version is much faster.
> Is this to be expected?  Have I misunderstood Interlocked?  Is it a
> limitation in mono?
> This was on mono 1.2.3 from Ubuntu 7.04.
> Thanks.
> _______________________________________________
> Mono-list maillist  -  Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-list/attachments/20070622/1614cf20/attachment.html 

More information about the Mono-list mailing list