futer.get()(如果任务没执行完将等待)

  1.  /** 
  2.       * 获取异步任务的执行结果(如果任务没执行完将等待) 
  3.       */  
  4.     V get() throws InterruptedException, ExecutionException;  

Future必要时可以通过get方法获取执行结果,该方法会阻塞直到任务返回结果

 

原文地址:https://www.cnblogs.com/panxuejun/p/8630207.html