Warning timer thread should run as a daemon (#3450)

This commit is contained in:
Thomas Schroeter 2018-06-27 12:57:37 +01:00 committed by GitHub
parent 7e05e373d7
commit 66cb0e389b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -77,7 +77,7 @@ class NetworkBootstrapper
val numParallelProcesses = Runtime.getRuntime().availableProcessors()
val timePerNode = 40.seconds // On the test machine, generating the node info takes 7 seconds for a single node.
val tExpected = maxOf(timePerNode, timePerNode * nodeDirs.size.toLong() / numParallelProcesses.toLong())
val warningTimer = Timer("WarnOnSlowMachines", false).schedule(tExpected.toMillis()) {
val warningTimer = Timer("WarnOnSlowMachines", true).schedule(tExpected.toMillis()) {
println("... still waiting. If this is taking longer than usual, check the node logs.")
}
val executor = Executors.newFixedThreadPool(numParallelProcesses)