Adjustments based on review. See #1805

This commit is contained in:
Patrik Nordwall 2012-02-08 14:03:31 +01:00
parent 1f988889c2
commit df1606a8ee
4 changed files with 12 additions and 8 deletions

View file

@ -173,7 +173,7 @@ case class MonitorableThreadFactory(name: String,
def newThread(pool: ForkJoinPool): ForkJoinWorkerThread = {
val t = wire(ForkJoinPool.defaultForkJoinWorkerThreadFactory.newThread(pool))
// Name of the threads for the ForkJoinPool are not customizable. Change it here.
if (t.getName.startsWith("ForkJoinPool-")) t.setName(name + "-" + t.getName.substring("ForkJoinPool-".length))
t.setName(name + "-" + counter.incrementAndGet())
t
}