1.明確java中線程最後執行的還是runnable
!!!–從頂級接口Executor中方法execute(Runnable)看出!
**傳入提交是 callable 但是底層是轉爲runnable的子類FutureTask(還是runnable)的!**
2.只是這個futureTask內部維護了很多屬性字段如:callable字段,outcome線程結果等,也提供 fure.get()取得outcome結果
如標題想要獲取線程返回值,
1.明確java中線程最後執行的還是runnable
!!!–從頂級接口Executor中方法execute(Runnable)看出!
**傳入提交是 callable 但是底層是轉爲runnable的子類FutureTask(還是runnable)的!**
2.只是這個futureTask內部維護了很多屬性字段如:callable字段,outcome線程結果等,也提供 fure.get()取得outcome結果
如標題想要獲取線程返回值,