[Mono-bugs] [Bug 53230][Min] New - Synclock Blocks Not Implemented

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Thu, 22 Jan 2004 15:13:30 -0500 (EST)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by jconley@winfessor.com.

http://bugzilla.ximian.com/show_bug.cgi?id=53230

--- shadow/53230	2004-01-22 15:13:30.000000000 -0500
+++ shadow/53230.tmp.18531	2004-01-22 15:13:30.000000000 -0500
@@ -0,0 +1,55 @@
+Bug#: 53230
+Product: Mono/Compilers
+Version: unspecified
+OS: 
+OS Details: Microsoft Windows Server 2003 Enterprise Edition
+Status: NEW   
+Resolution: 
+Severity: Unknown
+Priority: Minor
+Component: Basic
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: jconley@winfessor.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Synclock Blocks Not Implemented
+
+Description of Problem:
+Synclock Blocks are not implemented.  In a highly multi-threaded 
+environment the amount code required to get around it becomes cumbersome.
+
+Steps to reproduce the problem:
+1. Create some code with a Synclock Block.
+2. Try to compile it.
+or 2. Compile it with MS compiler.
+3. Try to run it with Mono
+
+Actual Results:
+NotImplementedException is thrown.
+
+Expected Results:
+Synclock should work.
+
+How often does this happen? 
+Every time.
+
+Additional Information:
+In order to work around this issue the following code is used:
+
+Dim o As New Object
+
+System.Threading.Monitor.Enter(o)
+Try
+    System.Console.WriteLine("In the lock")
+Finally
+    System.Threading.Monitor.Exit(o)
+End Try
+
+The code, with synclock blocks working would look like:
+
+Dim o As New Object
+Synclock o
+    System.Console.WriteLine("In the lock")
+End Synclock