From b546bec064ee3b98bb345bbb390d3a88998f39f5 Mon Sep 17 00:00:00 2001 From: Mike Hearn Date: Mon, 10 Jul 2017 17:40:29 +0200 Subject: [PATCH] Make the RPC observations pool use daemon threads. --- .../net/corda/client/rpc/internal/RPCClientProxyHandler.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/rpc/src/main/kotlin/net/corda/client/rpc/internal/RPCClientProxyHandler.kt b/client/rpc/src/main/kotlin/net/corda/client/rpc/internal/RPCClientProxyHandler.kt index dce8fb99dd..bade7b368e 100644 --- a/client/rpc/src/main/kotlin/net/corda/client/rpc/internal/RPCClientProxyHandler.kt +++ b/client/rpc/src/main/kotlin/net/corda/client/rpc/internal/RPCClientProxyHandler.kt @@ -85,7 +85,7 @@ class RPCClientProxyHandler( private var reaperExecutor: ScheduledExecutorService? = null // A sticky pool for running Observable.onNext()s. We need the stickiness to preserve the observation ordering. - private val observationExecutorThreadFactory = ThreadFactoryBuilder().setNameFormat("rpc-client-observation-pool-%d").build() + private val observationExecutorThreadFactory = ThreadFactoryBuilder().setNameFormat("rpc-client-observation-pool-%d").setDaemon(true).build() private val observationExecutorPool = LazyStickyPool(rpcConfiguration.observationExecutorPoolSize) { Executors.newFixedThreadPool(1, observationExecutorThreadFactory) }