activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r919036 - /activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Transport/InactivityMonitor.cs
Date Thu, 04 Mar 2010 15:55:58 GMT
Author: tabish
Date: Thu Mar  4 15:55:58 2010
New Revision: 919036

URL: http://svn.apache.org/viewvc?rev=919036&view=rev
Log:
Fix for: http://issues.apache.org/activemq/browse/AMQNET-240

Modified:
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Transport/InactivityMonitor.cs

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Transport/InactivityMonitor.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Transport/InactivityMonitor.cs?rev=919036&r1=919035&r2=919036&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Transport/InactivityMonitor.cs
(original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Transport/InactivityMonitor.cs
Thu Mar  4 15:55:58 2010
@@ -39,10 +39,10 @@
         private Atomic<bool> inRead = new Atomic<bool>(false);
         private Atomic<bool> inWrite = new Atomic<bool>(false);
 
-		private CompositeTaskRunner asyncTasks;
+        private CompositeTaskRunner asyncTasks;
         private AsyncSignalReadErrorkTask asyncErrorTask;
         private AsyncWriteTask asyncWriteTask;
-		
+
         private Mutex monitor = new Mutex();
 
         private Timer readCheckTimer;
@@ -236,7 +236,7 @@
         {
             // Disable inactivity monitoring while processing a command.
             //synchronize this method - its not synchronized
-            //further down the transport stack and gets called by more 
+            //further down the transport stack and gets called by more
             //than one thread  by this class
             lock(inWrite)
             {
@@ -344,11 +344,11 @@
                     // Attempt to wait for the Timers to shutdown, but don't wait
                     // forever, if they don't shutdown after two seconds, just quit.
                     this.readCheckTimer.Dispose(shutdownEvent);
-                    shutdownEvent.WaitOne(TimeSpan.FromMilliseconds(2000));
+                    shutdownEvent.WaitOne(TimeSpan.FromMilliseconds(2000), false);
                     this.writeCheckTimer.Dispose(shutdownEvent);
-                    shutdownEvent.WaitOne(TimeSpan.FromMilliseconds(2000));
+                    shutdownEvent.WaitOne(TimeSpan.FromMilliseconds(2000), false);
 
-					this.asyncTasks.Shutdown();
+                    this.asyncTasks.Shutdown();
                     this.asyncTasks = null;
                     this.asyncWriteTask = null;
                     this.asyncErrorTask = null;
@@ -363,7 +363,7 @@
             private InactivityMonitor parent;
             private Uri remote;
             private Atomic<bool> pending = new Atomic<bool>(false);
-    
+
             public AsyncSignalReadErrorkTask(InactivityMonitor parent, Uri remote)
             {
                 this.parent = parent;
@@ -375,7 +375,7 @@
                 get { return this.pending.Value; }
                 set { this.pending.Value = value; }
             }
-    
+
             public bool Iterate()
             {
                 if(this.pending.CompareAndSet(true, false) && this.parent.monitorStarted.Value)
@@ -383,28 +383,28 @@
                     IOException ex = new IOException("Channel was inactive for too long:
" + remote);
                     this.parent.OnException(parent, ex);
                 }
-    
+
                 return this.pending.Value;
             }
         }
-    
+
         // Task that fires when the TaskRunner is signaled by the WriteCheck Timer Task.
         class AsyncWriteTask : CompositeTask
         {
             private InactivityMonitor parent;
             private Atomic<bool> pending = new Atomic<bool>(false);
-    
+
             public AsyncWriteTask(InactivityMonitor parent)
             {
                 this.parent = parent;
             }
-    
+
             public bool IsPending
             {
                 get { return this.pending.Value; }
                 set { this.pending.Value = value; }
             }
-    
+
             public bool Iterate()
             {
                 if(this.pending.CompareAndSet(true, false) && this.parent.monitorStarted.Value)
@@ -420,7 +420,7 @@
                         this.parent.OnException(parent, e);
                     }
                 }
-    
+
                 return this.pending.Value;
             }
         }



Mime
View raw message