You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by cz...@apache.org on 2015/08/27 16:57:14 UTC

svn commit: r1698178 - in /felix/trunk/eventadmin/impl: changelog.txt src/main/java/org/apache/felix/eventadmin/impl/tasks/DefaultThreadPool.java

Author: cziegeler
Date: Thu Aug 27 14:57:13 2015
New Revision: 1698178

URL: http://svn.apache.org/r1698178
Log:
FELIX-5006 : EventAdmin threads should be named

Modified:
    felix/trunk/eventadmin/impl/changelog.txt
    felix/trunk/eventadmin/impl/src/main/java/org/apache/felix/eventadmin/impl/tasks/DefaultThreadPool.java

Modified: felix/trunk/eventadmin/impl/changelog.txt
URL: http://svn.apache.org/viewvc/felix/trunk/eventadmin/impl/changelog.txt?rev=1698178&r1=1698177&r2=1698178&view=diff
==============================================================================
--- felix/trunk/eventadmin/impl/changelog.txt (original)
+++ felix/trunk/eventadmin/impl/changelog.txt Thu Aug 27 14:57:13 2015
@@ -1,3 +1,9 @@
+Changes from 1.4.4 to 1.4.6
+---------------------------
+** Improvement
+    * [FELIX-5006] - EventAdmin threads should be named
+
+
 Changes from 1.4.2 to 1.4.4
 ---------------------------
 ** Improvement

Modified: felix/trunk/eventadmin/impl/src/main/java/org/apache/felix/eventadmin/impl/tasks/DefaultThreadPool.java
URL: http://svn.apache.org/viewvc/felix/trunk/eventadmin/impl/src/main/java/org/apache/felix/eventadmin/impl/tasks/DefaultThreadPool.java?rev=1698178&r1=1698177&r2=1698178&view=diff
==============================================================================
--- felix/trunk/eventadmin/impl/src/main/java/org/apache/felix/eventadmin/impl/tasks/DefaultThreadPool.java (original)
+++ felix/trunk/eventadmin/impl/src/main/java/org/apache/felix/eventadmin/impl/tasks/DefaultThreadPool.java Thu Aug 27 14:57:13 2015
@@ -20,6 +20,7 @@ import java.util.concurrent.ExecutorServ
 import java.util.concurrent.Executors;
 import java.util.concurrent.RejectedExecutionException;
 import java.util.concurrent.ThreadFactory;
+import java.util.concurrent.atomic.AtomicLong;
 
 import org.apache.felix.eventadmin.impl.util.LogWrapper;
 
@@ -39,6 +40,8 @@ public class DefaultThreadPool
 
     private int oldSize = -1;
 
+    private final AtomicLong threadCounter = new AtomicLong(1);
+
     /**
      * Create a new pool.
      */
@@ -56,6 +59,7 @@ public class DefaultThreadPool
                     thread.setPriority( Thread.NORM_PRIORITY );
                     thread.setDaemon( true );
 
+                    thread.setName("EventAdminThread #" + threadCounter.getAndIncrement());
                     return thread;
                 }
             };