Bläddra i källkod

2005-07-19 Martin Baulig <[email protected]>

	* Timer.cs (Timer.Runner.Start): Fix a race condition which was
	causing a hang on exit int he debugger: check `!disposed' before
	`start_event.WaitOne ()' and again after it.


svn path=/trunk/mcs/; revision=47401
Martin Baulig 20 år sedan
förälder
incheckning
65ad2a3b45

+ 6 - 0
mcs/class/corlib/System.Threading/ChangeLog

@@ -1,3 +1,9 @@
+2005-07-19  Martin Baulig  <[email protected]>
+
+	* Timer.cs (Timer.Runner.Start): Fix a race condition which was
+	causing a hang on exit int he debugger: check `!disposed' before
+	`start_event.WaitOne ()' and again after it.
+
 2005-06-07 Gonzalo Paniagua Javier <[email protected]>
 
 	* Thread.cs: check that the culture is valid for formatting

+ 4 - 1
mcs/class/corlib/System.Threading/Timer.cs

@@ -105,7 +105,10 @@ namespace System.Threading
 
 			public void Start ()
 			{
-				while (start_event.WaitOne () && !disposed) {
+				while (!disposed && start_event.WaitOne ()) {
+					if (disposed)
+						return;
+
 					aborted = false;
 
 					if (dueTime == Timeout.Infinite)