[infinispan-commits] Infinispan SVN: r838 - trunk/core/src/main/java/org/infinispan/executors.
infinispan-commits at lists.jboss.org
infinispan-commits at lists.jboss.org
Fri Sep 18 11:29:59 EDT 2009
Author: galder.zamarreno at jboss.com
Date: 2009-09-18 11:29:58 -0400 (Fri, 18 Sep 2009)
New Revision: 838
Modified:
trunk/core/src/main/java/org/infinispan/executors/DefaultScheduledExecutorFactory.java
Log:
When a threadNamePrefix is defined, DefaultScheduledExecutorFactory and DefaultExecutorFactory threads use the same name making it hard to identify where threads are coming from. Adding "Scheduled" to the threads coming from DefaultScheduledExecutorFactory to be able to differentiate them.
Modified: trunk/core/src/main/java/org/infinispan/executors/DefaultScheduledExecutorFactory.java
===================================================================
--- trunk/core/src/main/java/org/infinispan/executors/DefaultScheduledExecutorFactory.java 2009-09-18 14:29:08 UTC (rev 837)
+++ trunk/core/src/main/java/org/infinispan/executors/DefaultScheduledExecutorFactory.java 2009-09-18 15:29:58 UTC (rev 838)
@@ -19,7 +19,7 @@
final String threadNamePrefix = p.getProperty("threadNamePrefix", "ScheduledThread");
return Executors.newSingleThreadScheduledExecutor(new ThreadFactory() {
public Thread newThread(Runnable r) {
- Thread th = new Thread(r, threadNamePrefix + "-" + counter.getAndIncrement());
+ Thread th = new Thread(r, "Scheduled-" + threadNamePrefix + "-" + counter.getAndIncrement());
th.setDaemon(true);
return th;
}
More information about the infinispan-commits
mailing list