語言

ForkJoinPool.CommonPool 方法

定義

回傳公共池實例。

[Android.Runtime.Register("commonPool", "()Ljava/util/concurrent/ForkJoinPool;", "", ApiSince=24)]
public static Java.Util.Concurrent.ForkJoinPool? CommonPool();
[<Android.Runtime.Register("commonPool", "()Ljava/util/concurrent/ForkJoinPool;", "", ApiSince=24)>]
static member CommonPool : unit -> Java.Util.Concurrent.ForkJoinPool

傳回

公共池實例

屬性

備註

回傳公共池實例。 此池為靜態建造;其運行狀態不受嘗試或 #shutdown#shutdownNow影響。 然而,這個池子以及所有正在進行的處理在程式 System#exit時都會自動終止。 任何依賴非同步任務處理完成後完成程式的程式,應在退出前呼叫 commonPool().#awaitQuiescence awaitQuiescence。

新增於1.8版本。

Java 文件 java.util.concurrent.ForkJoinPool.commonPool()。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於