【发布时间】:2015-10-20 19:06:57
【问题描述】:
我正在为 API 端点创建一个客户端库,使用 Unirest 来模拟 GET 和 POST 请求。程序完成后,必须调用以下代码来终止当前线程。
Unirest.shutdown(); // must be called in order to clear the high CPU consuming thread
是否有任何可能的方法在程序执行结束时在我的客户端库中隐式调用它?
【问题讨论】:
-
这是您要找的吗? stackoverflow.com/a/750058/1791872