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  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-list

Reply via email to