标题说明了一切。对于这两种方法,对于应该使用哪种方法没有明确的说明。
发布于 2017-12-30 00:20:49
这两种方法都在等待光纤完成。get()方法返回结果,而join()方法不返回结果。
get()
join()
为什么API有这两种方法?因为各自的接口(Future和Joinable)都需要。
Future
Joinable
用哪一种?做你想做的事!
https://stackoverflow.com/questions/48028842
相似问题