Re: JavaMemoryModel: C# Memory Model?

From: Gregory Thain (thain@primenet.com)
Date: Tue Jun 27 2000 - 12:13:46 EDT


>So it looks like we don't need to worry about a memory model for C#;
>either C# doesn't have threads, or it has ill-defined threads (e.g.,
>COM threads). Anyone know anything to the contrary?

Speaking of ill-defined, quoting from the manual:

lock (x) ...
where x is an expression of a reference-type, is precisely equivalent to

System.CriticalSection.Enter(x);
  try {
  finally {
   System.CriticalSection.Exit(x);

except that x is only evaluated once. The exact behavior of the Enter
and Exit methods of the System.CriticalSection class is implementation
defined.

-greg
thain@primenet.com
-------------------------------
JavaMemoryModel mailing list - http://www.cs.umd.edu/~pugh/java/memoryModel



This archive was generated by hypermail 2b29 : Thu Oct 13 2005 - 07:00:26 EDT