activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1063500 - /activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Threads/ThreadPoolExecutor.cs
Date Tue, 25 Jan 2011 22:55:33 GMT
Author: tabish
Date: Tue Jan 25 22:55:33 2011
New Revision: 1063500

URL: http://svn.apache.org/viewvc?rev=1063500&view=rev
Log:
https://issues.apache.org/activemq/browse/AMQNET-290

Catch exceptions from WaitCallback execution

Modified:
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Threads/ThreadPoolExecutor.cs

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Threads/ThreadPoolExecutor.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Threads/ThreadPoolExecutor.cs?rev=1063500&r1=1063499&r2=1063500&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Threads/ThreadPoolExecutor.cs
(original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Threads/ThreadPoolExecutor.cs
Tue Jan 25 22:55:33 2011
@@ -42,8 +42,8 @@ namespace Apache.NMS.ActiveMQ.Threads
         /// </summary>
         internal class Future
         {
-            private WaitCallback callback;
-            private object callbackArg;
+            private readonly WaitCallback callback;
+            private readonly object callbackArg;
 
             public Future(WaitCallback callback, object arg)
             {
@@ -58,7 +58,13 @@ namespace Apache.NMS.ActiveMQ.Threads
                     throw new Exception("Future executed with null WaitCallback");
                 }
 
-                this.callback(callbackArg);
+                try
+                {
+                    this.callback(callbackArg);
+                }
+                catch
+                {
+                }
             }
         }
 



Mime
View raw message