f-spot r4592 - in trunk: . src/Core



Author: sdelcroix
Date: Tue Nov 18 13:54:28 2008
New Revision: 4592
URL: http://svn.gnome.org/viewvc/f-spot?rev=4592&view=rev

Log:
2008-11-18  Stephane Delcroix  <sdelcroix novell com>

	* src/Core/Delay.cs: do not lock(this)

Modified:
   trunk/ChangeLog
   trunk/src/Core/Delay.cs

Modified: trunk/src/Core/Delay.cs
==============================================================================
--- trunk/src/Core/Delay.cs	(original)
+++ trunk/src/Core/Delay.cs	Tue Nov 18 13:54:28 2008
@@ -16,6 +16,8 @@
 {
 	public class Delay
 	{
+		object syncHandle = new object ();
+
 		public Delay (uint interval, GLib.IdleHandler op)
 		{
 			this.op += op;
@@ -35,7 +37,7 @@
 
 		private bool HandleOperation ()
 		{
-			lock (this) {
+			lock (syncHandle) {
 				bool runagain = op ();
 				if (!runagain)
 					source = 0;
@@ -45,7 +47,7 @@
 		}
 		
 		public void Start () {
-			lock (this) {
+			lock (syncHandle) {
 				if (this.IsPending)
 					return;
 
@@ -74,7 +76,7 @@
 		
 		public void Stop () 
 		{
-			lock (this) {
+			lock (syncHandle) {
 				if (this.IsPending) {
 					GLib.Source.Remove (source);
 					source = 0;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]