Sequencing `Future`s with timeout

限于喜欢 提交于 2019-12-04 10:51:45

If you used my code exactly as described, then my guess is that the Netty HashedWheelTimer that sits under the TimeoutScheduler object is not being terminated. You could try explicitly calling stop on it, after calling http.shutdown like so:

TimeoutScheduler.timer.stop

Now if you wanted the Netty HashedWheelTimer to use a daemon thread, then you can use one of the constructors on it (I'm seeing them in 3.6.6-Final) that accepts a ThreadFactory and then use a custom ThreadFactory that sets the daemon flag to true.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!