Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
b51cc74c
D
dragonwell8_jdk
项目概览
openanolis
/
dragonwell8_jdk
通知
4
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_jdk
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
b51cc74c
编写于
9月 05, 2014
作者:
D
dl
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8056249: Improve CompletableFuture resource usage
Reviewed-by: psandoz, chegar, martin
上级
4352a351
变更
2
展开全部
隐藏空白更改
内联
并排
Showing
2 changed file
with
1656 addition
and
2271 deletion
+1656
-2271
src/share/classes/java/util/concurrent/CompletableFuture.java
...share/classes/java/util/concurrent/CompletableFuture.java
+1609
-2244
src/share/classes/java/util/concurrent/CompletionStage.java
src/share/classes/java/util/concurrent/CompletionStage.java
+47
-27
未找到文件。
src/share/classes/java/util/concurrent/CompletableFuture.java
浏览文件 @
b51cc74c
此差异已折叠。
点击以展开。
src/share/classes/java/util/concurrent/CompletionStage.java
浏览文件 @
b51cc74c
...
...
@@ -407,7 +407,7 @@ public interface CompletionStage<T> {
/**
* Returns a new CompletionStage that, when this and the other
* given stage complete normally, executes the given action using
* the supplied executor
* the supplied executor
.
*
* See the {@link CompletionStage} documentation for rules
* covering exceptional completion.
...
...
@@ -569,7 +569,7 @@ public interface CompletionStage<T> {
/**
* Returns a new CompletionStage that, when either this or the
* other given stage complete normally, executes the given action
* using supplied executor.
* using
the
supplied executor.
*
* See the {@link CompletionStage} documentation for rules
* covering exceptional completion.
...
...
@@ -649,10 +649,15 @@ public interface CompletionStage<T> {
(
Function
<
Throwable
,
?
extends
T
>
fn
);
/**
* Returns a new CompletionStage with the same result or exception
* as this stage, and when this stage completes, executes the
* given action with the result (or {@code null} if none) and the
* exception (or {@code null} if none) of this stage.
* Returns a new CompletionStage with the same result or exception as
* this stage, that executes the given action when this stage completes.
*
* <p>When this stage is complete, the given action is invoked with the
* result (or {@code null} if none) and the exception (or {@code null}
* if none) of this stage as arguments. The returned stage is completed
* when the action returns. If the supplied action itself encounters an
* exception, then the returned stage exceptionally completes with this
* exception unless this stage also completed exceptionally.
*
* @param action the action to perform
* @return the new CompletionStage
...
...
@@ -661,12 +666,16 @@ public interface CompletionStage<T> {
(
BiConsumer
<?
super
T
,
?
super
Throwable
>
action
);
/**
* Returns a new CompletionStage with the same result or exception
* as this stage, and when this stage completes, executes the
* given action executes the given action using this stage's
* default asynchronous execution facility, with the result (or
* {@code null} if none) and the exception (or {@code null} if
* none) of this stage as arguments.
* Returns a new CompletionStage with the same result or exception as
* this stage, that executes the given action using this stage's
* default asynchronous execution facility when this stage completes.
*
* <p>When this stage is complete, the given action is invoked with the
* result (or {@code null} if none) and the exception (or {@code null}
* if none) of this stage as arguments. The returned stage is completed
* when the action returns. If the supplied action itself encounters an
* exception, then the returned stage exceptionally completes with this
* exception unless this stage also completed exceptionally.
*
* @param action the action to perform
* @return the new CompletionStage
...
...
@@ -675,11 +684,16 @@ public interface CompletionStage<T> {
(
BiConsumer
<?
super
T
,
?
super
Throwable
>
action
);
/**
* Returns a new CompletionStage with the same result or exception
* as this stage, and when this stage completes, executes using
* the supplied Executor, the given action with the result (or
* {@code null} if none) and the exception (or {@code null} if
* none) of this stage as arguments.
* Returns a new CompletionStage with the same result or exception as
* this stage, that executes the given action using the supplied
* Executor when this stage completes.
*
* <p>When this stage is complete, the given action is invoked with the
* result (or {@code null} if none) and the exception (or {@code null}
* if none) of this stage as arguments. The returned stage is completed
* when the action returns. If the supplied action itself encounters an
* exception, then the returned stage exceptionally completes with this
* exception unless this stage also completed exceptionally.
*
* @param action the action to perform
* @param executor the executor to use for asynchronous execution
...
...
@@ -693,9 +707,11 @@ public interface CompletionStage<T> {
* Returns a new CompletionStage that, when this stage completes
* either normally or exceptionally, is executed with this stage's
* result and exception as arguments to the supplied function.
* The given function is invoked with the result (or {@code null}
* if none) and the exception (or {@code null} if none) of this
* stage when complete as arguments.
*
* <p>When this stage is complete, the given function is invoked
* with the result (or {@code null} if none) and the exception (or
* {@code null} if none) of this stage as arguments, and the
* function's result is used to complete the returned stage.
*
* @param fn the function to use to compute the value of the
* returned CompletionStage
...
...
@@ -710,9 +726,11 @@ public interface CompletionStage<T> {
* either normally or exceptionally, is executed using this stage's
* default asynchronous execution facility, with this stage's
* result and exception as arguments to the supplied function.
* The given function is invoked with the result (or {@code null}
* if none) and the exception (or {@code null} if none) of this
* stage when complete as arguments.
*
* <p>When this stage is complete, the given function is invoked
* with the result (or {@code null} if none) and the exception (or
* {@code null} if none) of this stage as arguments, and the
* function's result is used to complete the returned stage.
*
* @param fn the function to use to compute the value of the
* returned CompletionStage
...
...
@@ -726,10 +744,12 @@ public interface CompletionStage<T> {
* Returns a new CompletionStage that, when this stage completes
* either normally or exceptionally, is executed using the
* supplied executor, with this stage's result and exception as
* arguments to the supplied function. The given function is
* invoked with the result (or {@code null} if none) and the
* exception (or {@code null} if none) of this stage when complete
* as arguments.
* arguments to the supplied function.
*
* <p>When this stage is complete, the given function is invoked
* with the result (or {@code null} if none) and the exception (or
* {@code null} if none) of this stage as arguments, and the
* function's result is used to complete the returned stage.
*
* @param fn the function to use to compute the value of the
* returned CompletionStage
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录