Skip to content

Commit e26afb3

Browse files
authored
Merge pull request #2616 from wayne-pq/feature_add_future
add: 增加 Future 的源码参考文章
2 parents a2308d2 + 18ea39f commit e26afb3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

docs/java/concurrent/java-concurrent-questions-03.md

+1
Original file line numberDiff line numberDiff line change
@@ -885,6 +885,7 @@ public FutureTask(Runnable runnable, V result) {
885885

886886
`FutureTask`相当于对`Callable` 进行了封装,管理着任务执行的情况,存储了 `Callable` 的 `call` 方法的任务执行结果。
887887

888+
关于更多 `Future` 的源码细节,可以肝这篇万字解析,写的很清楚:[Java是如何实现Future模式的?万字详解!](https://juejin.cn/post/6844904199625375757)。
888889
### CompletableFuture 类有什么用?
889890

890891
`Future` 在实际使用过程中存在一些局限性比如不支持异步任务的编排组合、获取计算结果的 `get()` 方法为阻塞调用。

0 commit comments

Comments
 (0)