mirror of
https://github.com/corda/corda.git
synced 2025-01-14 16:59:52 +00:00
CORDA-1004 Use FastThreadLocalThread in multi-thread SMM. (#492)
This commit is contained in:
parent
8239c5d29f
commit
26a11bccc9
@ -7,6 +7,7 @@ import com.codahale.metrics.graphite.PickledGraphite
|
||||
import com.google.common.util.concurrent.ThreadFactoryBuilder
|
||||
import com.jcraft.jsch.JSch
|
||||
import com.jcraft.jsch.JSchException
|
||||
import io.netty.util.concurrent.FastThreadLocalThread
|
||||
import net.corda.core.crypto.newSecureRandom
|
||||
import net.corda.core.identity.CordaX500Name
|
||||
import net.corda.core.internal.Emoji
|
||||
@ -23,7 +24,6 @@ import org.fusesource.jansi.Ansi
|
||||
import org.fusesource.jansi.AnsiConsole
|
||||
import java.io.IOException
|
||||
import java.net.Inet6Address
|
||||
import java.net.InetAddress
|
||||
import java.util.concurrent.ExecutorService
|
||||
import java.util.concurrent.Executors
|
||||
import java.util.concurrent.TimeUnit
|
||||
@ -166,7 +166,7 @@ D""".trimStart()
|
||||
private fun makeStateMachineExecutorService(): ExecutorService {
|
||||
return Executors.newFixedThreadPool(
|
||||
configuration.enterpriseConfiguration.tuning.flowThreadPoolSize,
|
||||
ThreadFactoryBuilder().setNameFormat("flow-executor-%d").build()
|
||||
ThreadFactoryBuilder().setNameFormat("flow-executor-%d").setThreadFactory(::FastThreadLocalThread).build()
|
||||
)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user