[Monodevelop-patches-list] r1300 - in trunk/MonoDevelop/src/Main/Base: . Gui/Pads/ClassScout

commit-watcher at mono-cvs.ximian.com commit-watcher at mono-cvs.ximian.com
Tue Mar 30 16:54:37 EST 2004


Author: tberman
Date: 2004-03-30 16:54:36 -0500 (Tue, 30 Mar 2004)
New Revision: 1300

Modified:
   trunk/MonoDevelop/src/Main/Base/ChangeLog
   trunk/MonoDevelop/src/Main/Base/Gui/Pads/ClassScout/ClassScout.cs
Log:
fix bug #56260, use GLib.Idle instead of Gdk.Threads


Modified: trunk/MonoDevelop/src/Main/Base/ChangeLog
===================================================================
--- trunk/MonoDevelop/src/Main/Base/ChangeLog	2004-03-30 05:16:40 UTC (rev 1299)
+++ trunk/MonoDevelop/src/Main/Base/ChangeLog	2004-03-30 21:54:36 UTC (rev 1300)
@@ -1,3 +1,9 @@
+2004-03-30  Todd Berman  <tberman at sevenl.net>
+
+	* Gui/Pads/ClassScout/ClassScout.cs: stop using Gdk.Threads.Enter and
+	.Leave, as they can cause deadlocks, using a GLib.IdleHandler instead.
+	Closes bug #56260
+
 2004-03-29  Todd Berman  <tberman at sevenl.net>
 
 	* Gui/Pads/ClassScout/ClassScout.cs: partial fix to bug with double

Modified: trunk/MonoDevelop/src/Main/Base/Gui/Pads/ClassScout/ClassScout.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Gui/Pads/ClassScout/ClassScout.cs	2004-03-30 05:16:40 UTC (rev 1299)
+++ trunk/MonoDevelop/src/Main/Base/Gui/Pads/ClassScout/ClassScout.cs	2004-03-30 21:54:36 UTC (rev 1300)
@@ -151,23 +151,38 @@
 			Nodes.Clear();
 		}
 
+		ParseInformationEventArgs add_e = null;
 		void OnParseInformationAdded(object sender, ParseInformationEventArgs e)
 		{
-			//Invoke(new MyParseEventD(AddParseInformation), new object[] { Nodes, e });
-			Gdk.Threads.Enter();
-			AddParseInformation(Nodes, e);
-			Gdk.Threads.Leave();
-			
+			add_e = e;
+			GLib.Idle.Add (new GLib.IdleHandler (addParseInfo));
 		}
+
+		bool addParseInfo ()
+		{
+			if (add_e != null) {
+				AddParseInformation (Nodes, add_e);
+				add_e = null;
+			}
+			return false;
+		}
 		
+		ParseInformationEventArgs remove_e;
 		void OnParseInformationRemoved(object sender, ParseInformationEventArgs e)
 		{
-			//Invoke(new MyParseEventD(RemoveParseInformation), new object[] { Nodes, e });
-			Gdk.Threads.Enter();
-			RemoveParseInformation(Nodes, e);
-			Gdk.Threads.Leave();
+			remove_e = e;
+			GLib.Idle.Add (new GLib.IdleHandler (removeParseInfo));
 		}
 
+		bool removeParseInfo ()
+		{
+			if (remove_e != null) {
+				RemoveParseInformation (Nodes, remove_e);
+				remove_e = null;
+			}
+			return false;
+		}
+
 		private void OnNodeActivated(object sender, Gtk.RowActivatedArgs args)
 		{
 			//base.OnDoubleClick(e);




More information about the Monodevelop-patches-list mailing list