activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jgo...@apache.org
Subject svn commit: r680821 - in /activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp: DispatchingThread.cs Session.cs
Date Tue, 29 Jul 2008 20:04:15 GMT
Author: jgomes
Date: Tue Jul 29 13:04:15 2008
New Revision: 680821

URL: http://svn.apache.org/viewvc?rev=680821&view=rev
Log:
Added timeouts to stop AsyncDelivery thread.

Modified:
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/DispatchingThread.cs
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Session.cs

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/DispatchingThread.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/DispatchingThread.cs?rev=680821&r1=680820&r2=680821&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/DispatchingThread.cs
(original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/DispatchingThread.cs
Tue Jul 29 13:04:15 2008
@@ -93,7 +93,11 @@
 			}
 			if(localThread!=null)
 			{
-				localThread.Join(timeoutMilliseconds);
+				if(!localThread.Join(timeoutMilliseconds))
+				{
+					Tracer.Info("!! Timeout waiting for Dispatcher localThread to stop");
+					localThread.Abort();
+				}
 			}
 			Tracer.Info("Dispatcher thread joined");
 		}

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Session.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Session.cs?rev=680821&r1=680820&r2=680821&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Session.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Session.cs Tue Jul
29 13:04:15 2008
@@ -624,7 +624,7 @@
 		{
 			if(startedAsyncDelivery)
 			{
-				dispatchingThread.Stop();
+				dispatchingThread.Stop(5000);
 				startedAsyncDelivery = false;
 			}
 		}



Mime
View raw message