CompletableFuture.ThenAcceptAsync 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
| 名稱 | Description |
|---|---|
| ThenAcceptAsync(IConsumer) |
回傳一個新的 CompletionStage,當該階段正常完成時,會使用該階段預設的非同步執行機制執行,該階段的結果作為所提供動作的參數。 |
| ThenAcceptAsync(IConsumer, IExecutor) |
回傳一個新的 CompletionStage,當此階段正常完成時,會使用所提供的執行者執行,該階段的結果作為所提供動作的參數。 |
ThenAcceptAsync(IConsumer)
回傳一個新的 CompletionStage,當該階段正常完成時,會使用該階段預設的非同步執行機制執行,該階段的結果作為所提供動作的參數。
[Android.Runtime.Register("thenAcceptAsync", "(Ljava/util/function/Consumer;)Ljava/util/concurrent/CompletableFuture;", "GetThenAcceptAsync_Ljava_util_function_Consumer_Handler", ApiSince=24)]
public virtual Java.Util.Concurrent.ICompletionStage? ThenAcceptAsync(Java.Util.Functions.IConsumer? action);
[<Android.Runtime.Register("thenAcceptAsync", "(Ljava/util/function/Consumer;)Ljava/util/concurrent/CompletableFuture;", "GetThenAcceptAsync_Ljava_util_function_Consumer_Handler", ApiSince=24)>]
abstract member ThenAcceptAsync : Java.Util.Functions.IConsumer -> Java.Util.Concurrent.ICompletionStage
override this.ThenAcceptAsync : Java.Util.Functions.IConsumer -> Java.Util.Concurrent.ICompletionStage
參數
- action
- IConsumer
完成返回的完成階段前要執行的動作
傳回
新的完成階段
實作
- 屬性
備註
回傳一個新的 CompletionStage,當該階段正常完成時,會使用該階段預設的非同步執行機制執行,該階段的結果作為所提供動作的參數。 請參閱 CompletionStage 文件以了解特殊完成的規則。
Java 參考 java.util.concurrent.CompletableFuture.thenAcceptAsync。
此頁面的部分是根據 Android 開放原始碼專案所建立和共用的工作進行修改,並根據 Creative Commons 2.5 屬性授權中所述的詞彙使用。
適用於
ThenAcceptAsync(IConsumer, IExecutor)
回傳一個新的 CompletionStage,當此階段正常完成時,會使用所提供的執行者執行,該階段的結果作為所提供動作的參數。
[Android.Runtime.Register("thenAcceptAsync", "(Ljava/util/function/Consumer;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture;", "GetThenAcceptAsync_Ljava_util_function_Consumer_Ljava_util_concurrent_Executor_Handler", ApiSince=24)]
public virtual Java.Util.Concurrent.ICompletionStage? ThenAcceptAsync(Java.Util.Functions.IConsumer? action, Java.Util.Concurrent.IExecutor? executor);
[<Android.Runtime.Register("thenAcceptAsync", "(Ljava/util/function/Consumer;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture;", "GetThenAcceptAsync_Ljava_util_function_Consumer_Ljava_util_concurrent_Executor_Handler", ApiSince=24)>]
abstract member ThenAcceptAsync : Java.Util.Functions.IConsumer * Java.Util.Concurrent.IExecutor -> Java.Util.Concurrent.ICompletionStage
override this.ThenAcceptAsync : Java.Util.Functions.IConsumer * Java.Util.Concurrent.IExecutor -> Java.Util.Concurrent.ICompletionStage
參數
- action
- IConsumer
完成返回的完成階段前要執行的動作
- executor
- IExecutor
執行者用於非同步執行
傳回
新的完成階段
實作
- 屬性
備註
回傳一個新的 CompletionStage,當此階段正常完成時,會使用所提供的執行者執行,該階段的結果作為所提供動作的參數。 請參閱 CompletionStage 文件以了解特殊完成的規則。
Java 參考 java.util.concurrent.CompletableFuture.thenAcceptAsync。
此頁面的部分是根據 Android 開放原始碼專案所建立和共用的工作進行修改,並根據 Creative Commons 2.5 屬性授權中所述的詞彙使用。