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 GitHub
parent 73666dbc7d
commit 20b806cb62

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,