【问题标题】:Jersey Rx client jersey-client-async-executor shutdownJersey Rx 客户端 jersey-client-async-executor 关闭
【发布时间】:2016-11-21 18:17:12
【问题描述】:

Web 应用程序 [ROOT] 似乎已经启动了一个名为 [jersey-client-async-executor-0] 的线程,但未能停止它。

如何优雅地关闭 jersey-client-async-executor?

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

【问题讨论】:

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


    【解决方案1】:

    Jersey 在请求完成后优雅地终止线程。 我正在使用 Spring Boot 调度程序使用 rx jersey 客户端发出异步请求。

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

    简单测试:

    In your subscriber, 
        Set<Thread> threadSet = Thread.getAllStackTraces().keySet();
    

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-12-24
      • 1970-01-01
      • 2018-11-09
      • 2014-11-26
      • 2017-01-17
      • 2015-08-28
      相关资源
      最近更新 更多