Author: mhutch
Date: 2007-03-06 19:27:43 -0500 (Tue, 06 Mar 2007)
New Revision: 73859

Modified:
   trunk/monodevelop/Extras/MonoDevelop.DesignerSupport/ChangeLog
   
trunk/monodevelop/Extras/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport/RemoteDesignerProcess.cs
Log:
2007-03-07  Michael Hutchinson <[EMAIL PROTECTED]>

        * MonoDevelop.DesignerSupport/RemoteDesignerProcess.cs:
          Only restart GUI thread if it was stopped by an exception. This 
          means that the GUI thread will now be able to stop, so there 
          won't be lots of orphaned mdhost processes left around.



Modified: trunk/monodevelop/Extras/MonoDevelop.DesignerSupport/ChangeLog
===================================================================
--- trunk/monodevelop/Extras/MonoDevelop.DesignerSupport/ChangeLog      
2007-03-06 23:57:05 UTC (rev 73858)
+++ trunk/monodevelop/Extras/MonoDevelop.DesignerSupport/ChangeLog      
2007-03-07 00:27:43 UTC (rev 73859)
@@ -1,3 +1,10 @@
+2007-03-07  Michael Hutchinson <[EMAIL PROTECTED]>
+
+       * MonoDevelop.DesignerSupport/RemoteDesignerProcess.cs:
+         Only restart GUI thread if it was stopped by an exception. This 
+         means that the GUI thread will now be able to stop, so there 
+         won't be lots of orphaned mdhost processes left around.
+
 2007-03-06  Michael Hutchinson <[EMAIL PROTECTED]>
 
        * MonoDevelop.DesignerSupport.PropertyGrid.Editors/EventEditor.cs:

Modified: 
trunk/monodevelop/Extras/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport/RemoteDesignerProcess.cs
===================================================================
--- 
trunk/monodevelop/Extras/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport/RemoteDesignerProcess.cs
   2007-03-06 23:57:05 UTC (rev 73858)
+++ 
trunk/monodevelop/Extras/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport/RemoteDesignerProcess.cs
   2007-03-07 00:27:43 UTC (rev 73859)
@@ -76,15 +76,24 @@
                
                void GuiThread ()
                {
-                       while (true) {
+                       System.Diagnostics.Trace.WriteLine ("Designer GUI 
thread starting.");
+                       
+                       //want to restart application loop when it's killed by 
an exception,
+                       //but let it die if Application.Quit() is called
+                       bool keepRunning = true;
+                       while (keepRunning) {
                                try {
+                                       keepRunning = false;
                                        Application.Run ();
                                } catch (Exception e) {
+                                       keepRunning = true;
                                        exceptionOccurred = true;
                                        System.Console.WriteLine ("An exception 
occurred in the GUI thread");
                                        HandleError (e);
                                }
                        }
+                       
+                       System.Diagnostics.Trace.WriteLine ("Designer GUI 
thread ending.");
                }
                
                public bool ExecuteSuccessfully (EventHandler handler)
@@ -236,6 +245,7 @@
                                propGridFrame.Dispose ();
                        
                        base.Dispose ();
+                       System.Diagnostics.Trace.WriteLine ("Designer GUI 
thread cleaned up.");
                }
        }
 }

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to