Fix thread names in EthScheduler to include the thread number. (#755)

Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
pull/2/head
Adrian Sutton 6 years ago committed by GitHub
parent 234a97d81c
commit 8ca6181001
  1. 6
      ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/manager/EthScheduler.java

@ -50,18 +50,18 @@ public class EthScheduler {
Executors.newFixedThreadPool( Executors.newFixedThreadPool(
syncWorkerCount, syncWorkerCount,
new ThreadFactoryBuilder() new ThreadFactoryBuilder()
.setNameFormat(EthScheduler.class.getSimpleName() + "-Workers") .setNameFormat(EthScheduler.class.getSimpleName() + "-Workers-%d")
.build()), .build()),
Executors.newScheduledThreadPool( Executors.newScheduledThreadPool(
1, 1,
new ThreadFactoryBuilder() new ThreadFactoryBuilder()
.setDaemon(true) .setDaemon(true)
.setNameFormat(EthScheduler.class.getSimpleName() + "Timer") .setNameFormat(EthScheduler.class.getSimpleName() + "Timer-%d")
.build()), .build()),
Executors.newFixedThreadPool( Executors.newFixedThreadPool(
txWorkerCount, txWorkerCount,
new ThreadFactoryBuilder() new ThreadFactoryBuilder()
.setNameFormat(EthScheduler.class.getSimpleName() + "-Transactions") .setNameFormat(EthScheduler.class.getSimpleName() + "-Transactions-%d")
.build())); .build()));
} }

Loading…
Cancel
Save