cinvoke-svn
[Top][All Lists]
Advanced

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

[cinvoke-svn] r144 - trunk/skorpion


From: will
Subject: [cinvoke-svn] r144 - trunk/skorpion
Date: 16 Mar 2007 03:59:07 -0400

Author: vmy
Date: 2007-03-16 03:59:06 -0400 (Fri, 16 Mar 2007)
New Revision: 144

Modified:
   trunk/skorpion/Chat.cs
Log:
mutex which was previously needed only in debug mode is now necessary in all 
modes of operation because Chat object is accessed by IrcConnection's 
OnReadLine() delegate

Modified: trunk/skorpion/Chat.cs
===================================================================
--- trunk/skorpion/Chat.cs      2007-03-16 04:58:54 UTC (rev 143)
+++ trunk/skorpion/Chat.cs      2007-03-16 07:59:06 UTC (rev 144)
@@ -37,8 +37,7 @@
                public Chat(bool debug)
                {
                        _debug = debug;
-                       if (_debug)
-                               _lock = new Mutex();
+                       _lock = new Mutex();
                }
 
                public void RestoreDeviceObjects(Device device)
@@ -49,8 +48,7 @@
 
                public void Print(string text)
                {
-                       if (_debug)
-                               _lock.WaitOne();
+                       _lock.WaitOne();
 
                        _entries.Insert(0, text);
                        while(_entries.Count > 50)
@@ -58,8 +56,7 @@
                                _entries.RemoveAt(49);
                        }
 
-                       if (_debug)
-                               _lock.ReleaseMutex();
+                       _lock.ReleaseMutex();
                }
 
                public void PrintFormat(string text, params object[] args)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]