Jersey Rx客户端jersey-client-async-executor shutdown

时间:2016-07-19 02:22:49

标签: spring-boot jersey rx-java jersey-2.0 jersey-client

Web应用程序[ROOT]似乎已启动名为[jersey-client-async-executor-0]的线程但未能将其停止。

如何正常关闭jersey-client-async-executor?

这与Spring Boot一起使用,JerseyRxClient与嵌入式tomcat一起使用。

1 个答案:

答案 0 :(得分:0)

Jersey一旦请求完成,就会优雅地终止线程。 我正在使用spring boot scheduler来使用rx jersey客户端发出异步请求。

每次调度程序运行时我都有同样的疑问,泽西客户端会创建新的线程来增加数量。 为了确保线程终止,

简单测试:

bash$ l="2->4->3"
bash$ for x in `echo $l | sed 's/->/ /g'`; do echo $x; done
2
4
3

这不会列出用于发出请求的jersey-client-async-executor- *。