Make RPC client reaper threads into daemons so that they don't block JVM shutdown. (#781)

This commit is contained in:
Chris Rankin 2017-06-01 17:57:38 +01:00 committed by Katarzyna Streich
parent 1721f9c15e
commit 25c5df3dc3

View File

@ -157,7 +157,7 @@ class RPCClientProxyHandler(
lifeCycle.requireState(State.UNSTARTED)
reaperExecutor = Executors.newScheduledThreadPool(
1,
ThreadFactoryBuilder().setNameFormat("rpc-client-reaper-%d").build()
ThreadFactoryBuilder().setNameFormat("rpc-client-reaper-%d").setDaemon(true).build()
)
reaperScheduledFuture = reaperExecutor!!.scheduleAtFixedRate(
this::reapObservables,