[Mono-bugs] [Bug 46650][Nor] Changed - Race condition in code compilation (with delegates).

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
Sun, 20 Jul 2003 18:52:19 -0400 (EDT)


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 miguel@ximian.com.

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

--- shadow/46650	Sun Jul 20 18:51:08 2003
+++ shadow/46650.tmp.25625	Sun Jul 20 18:52:19 2003
@@ -1,14 +1,14 @@
 Bug#: 46650
 Product: Mono/Runtime
 Version: unspecified
-OS: 
+OS: unknown
 OS Details: 
 Status: NEW   
 Resolution: 
-Severity: 
+Severity: Unknown
 Priority: Normal
 Component: misc
 AssignedTo: mono-bugs@ximian.com                            
 ReportedBy: miguel@ximian.com               
 QAContact: mono-bugs@ximian.com
 TargetMilestone: ---
@@ -327,6 +327,49 @@
 83		gint32 disp;
 84		char *o;
 85		gpointer addr;
 86	
 87		EnterCriticalSection (metadata_section);
 (gdb) list
+
+------- Additional Comments From miguel@ximian.com  2003-07-20 18:52 -------
+using System;
+using System.IO;
+using System.Net;
+using System.Text;
+using System.Threading;
+using System.Runtime.Remoting.Messaging;
+
+class Fetcher {
+	delegate void LoadHTMLHandler ();
+ 
+	static AsyncCallback load_html_done;
+
+	static void Main (string [] args)
+	{
+		load_html_done = new AsyncCallback (LoadHTMLDone);
+
+		for (int i=0; i<10; i++) {
+			LoadHTMLHandler load_html = new LoadHTMLHandler (MakeRequest);
+			load_html.BeginInvoke (load_html_done, null);
+		}
+	}
+
+	public static void MakeRequest ()
+	{
+		Console.WriteLine("Starting to make a request.");
+
+	}
+
+	static void LoadHTMLDone (IAsyncResult ar)
+	{
+		LoadHTMLHandler load_html=(LoadHTMLHandler)
+(((AsyncResult)ar).AsyncDelegate);
+		Console.WriteLine ("LoadHTMLDone called");
+		try {
+			load_html.EndInvoke (ar);
+		} catch (Exception e) {
+			Console.WriteLine ("Exception: {0}", e);
+		}
+	}
+}
+