語言

ThreadPoolExecutor 建構函式

定義

多載

名稱 Description
ThreadPoolExecutor(IntPtr, JniHandleOwnership)

建立 JNI 物件的 Managed 表示法時使用的建構函式;由運行時間呼叫。

ThreadPoolExecutor(Int32, Int32, Int64, TimeUnit, IBlockingQueue)

建立 ThreadPoolExecutor 一個包含初始參數的新版本,分別是 Executors#defaultThreadFactory 預設執行緒工廠與 ThreadPoolExecutor。

ThreadPoolExecutor(Int32, Int32, Int64, TimeUnit, IBlockingQueue, IRejectedExecutionHandler)

建立 ThreadPoolExecutor 一個新的,包含給定的初始參數,以及 Executors#defaultThreadFactory 預設執行緒工廠。

ThreadPoolExecutor(Int32, Int32, Int64, TimeUnit, IBlockingQueue, IThreadFactory)

建立 ThreadPoolExecutor 一個包含給定初始參數及 ThreadPoolExecutor 的新檔案。

ThreadPoolExecutor(Int32, Int32, Int64, TimeUnit, IBlockingQueue, IThreadFactory, IRejectedExecutionHandler)

建立 ThreadPoolExecutor 一個包含給定初始參數的新版本。

ThreadPoolExecutor(IntPtr, JniHandleOwnership)

建立 JNI 物件的 Managed 表示法時使用的建構函式;由運行時間呼叫。

protected ThreadPoolExecutor(IntPtr javaReference, Android.Runtime.JniHandleOwnership transfer);
new Java.Util.Concurrent.ThreadPoolExecutor : nativeint * Android.Runtime.JniHandleOwnership -> Java.Util.Concurrent.ThreadPoolExecutor

參數

javaReference
IntPtr

nativeint

IntPtr,包含 Java Native Interface (JNI) 對象參考。

transfer
JniHandleOwnership

JniHandleOwnership,指出如何處理javaReference

備註

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

適用於

ThreadPoolExecutor(Int32, Int32, Int64, TimeUnit, IBlockingQueue)

建立 ThreadPoolExecutor 一個包含初始參數的新版本,分別是 Executors#defaultThreadFactory 預設執行緒工廠與 ThreadPoolExecutor。

[Android.Runtime.Register(".ctor", "(IIJLjava/util/concurrent/TimeUnit;Ljava/util/concurrent/BlockingQueue;)V", "")]
public ThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, Java.Util.Concurrent.TimeUnit? unit, Java.Util.Concurrent.IBlockingQueue? workQueue);
[<Android.Runtime.Register(".ctor", "(IIJLjava/util/concurrent/TimeUnit;Ljava/util/concurrent/BlockingQueue;)V", "")>]
new Java.Util.Concurrent.ThreadPoolExecutor : int * int * int64 * Java.Util.Concurrent.TimeUnit * Java.Util.Concurrent.IBlockingQueue -> Java.Util.Concurrent.ThreadPoolExecutor

參數

corePoolSize
Int32

即使執行緒處於閒置狀態,也必須保留在池中,除非 allowCoreThreadTimeOut 設定

maximumPoolSize
Int32

池中允許的最大執行緒數

keepAliveTime
Int64

當執行緒數超過核心時,這是多餘閒置執行緒等待新任務後終止的最大時間。

unit
TimeUnit

論證的時間 keepAliveTime 單位

workQueue
IBlockingQueue

用來在任務執行前保留的佇列。 此佇列僅 Runnable 存放方法提交的 execute 任務。

屬性

備註

建立 ThreadPoolExecutor 一個包含初始參數的新版本,包括 Executors#defaultThreadFactory 預設執行緒工廠與 ThreadPoolExecutor.AbortPolicy 預設拒絕的執行處理器。

使用 Executors 工廠方法可能比這種通用建構器更方便。

Java 文件 java.util.concurrent.ThreadPoolExecutor.ThreadPoolExecutor(int, int, long, java.util.concurrent.TimeUnit, java.util.concurrent.BlockingQueue<java.lang.Runnable>)

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

適用於

ThreadPoolExecutor(Int32, Int32, Int64, TimeUnit, IBlockingQueue, IRejectedExecutionHandler)

建立 ThreadPoolExecutor 一個新的,包含給定的初始參數,以及 Executors#defaultThreadFactory 預設執行緒工廠。

[Android.Runtime.Register(".ctor", "(IIJLjava/util/concurrent/TimeUnit;Ljava/util/concurrent/BlockingQueue;Ljava/util/concurrent/RejectedExecutionHandler;)V", "")]
public ThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, Java.Util.Concurrent.TimeUnit? unit, Java.Util.Concurrent.IBlockingQueue? workQueue, Java.Util.Concurrent.IRejectedExecutionHandler? handler);
[<Android.Runtime.Register(".ctor", "(IIJLjava/util/concurrent/TimeUnit;Ljava/util/concurrent/BlockingQueue;Ljava/util/concurrent/RejectedExecutionHandler;)V", "")>]
new Java.Util.Concurrent.ThreadPoolExecutor : int * int * int64 * Java.Util.Concurrent.TimeUnit * Java.Util.Concurrent.IBlockingQueue * Java.Util.Concurrent.IRejectedExecutionHandler -> Java.Util.Concurrent.ThreadPoolExecutor

參數

corePoolSize
Int32

即使執行緒處於閒置狀態,也必須保留在池中,除非 allowCoreThreadTimeOut 設定

maximumPoolSize
Int32

池中允許的最大執行緒數

keepAliveTime
Int64

當執行緒數超過核心時,這是多餘閒置執行緒等待新任務後終止的最大時間。

unit
TimeUnit

論證的時間 keepAliveTime 單位

workQueue
IBlockingQueue

用來在任務執行前保留的佇列。 此佇列僅 Runnable 存放方法提交的 execute 任務。

handler
IRejectedExecutionHandler

當執行阻塞時,處理程序會被阻塞,因為執行緒界限和佇列容量已達

屬性

備註

建立 ThreadPoolExecutor 一個新的,包含給定的初始參數,以及 Executors#defaultThreadFactory 預設執行緒工廠。

Java 文件 java.util.concurrent.ThreadPoolExecutor.ThreadPoolExecutor(int, int, long, java.util.concurrent.TimeUnit, java.util.concurrent.BlockingQueue<java.lang.Runnable>, java.util.concurrent.RejectedExecutionHandler)

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

適用於

ThreadPoolExecutor(Int32, Int32, Int64, TimeUnit, IBlockingQueue, IThreadFactory)

建立 ThreadPoolExecutor 一個包含給定初始參數及 ThreadPoolExecutor 的新檔案。

[Android.Runtime.Register(".ctor", "(IIJLjava/util/concurrent/TimeUnit;Ljava/util/concurrent/BlockingQueue;Ljava/util/concurrent/ThreadFactory;)V", "")]
public ThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, Java.Util.Concurrent.TimeUnit? unit, Java.Util.Concurrent.IBlockingQueue? workQueue, Java.Util.Concurrent.IThreadFactory? threadFactory);
[<Android.Runtime.Register(".ctor", "(IIJLjava/util/concurrent/TimeUnit;Ljava/util/concurrent/BlockingQueue;Ljava/util/concurrent/ThreadFactory;)V", "")>]
new Java.Util.Concurrent.ThreadPoolExecutor : int * int * int64 * Java.Util.Concurrent.TimeUnit * Java.Util.Concurrent.IBlockingQueue * Java.Util.Concurrent.IThreadFactory -> Java.Util.Concurrent.ThreadPoolExecutor

參數

corePoolSize
Int32

即使執行緒處於閒置狀態,也必須保留在池中,除非 allowCoreThreadTimeOut 設定

maximumPoolSize
Int32

池中允許的最大執行緒數

keepAliveTime
Int64

當執行緒數超過核心時,這是多餘閒置執行緒等待新任務後終止的最大時間。

unit
TimeUnit

論證的時間 keepAliveTime 單位

workQueue
IBlockingQueue

用來在任務執行前保留的佇列。 此佇列僅 Runnable 存放方法提交的 execute 任務。

threadFactory
IThreadFactory

執行者建立新執行緒時使用的工廠

屬性

備註

建立 ThreadPoolExecutor 一個包含給定初始參數及 ThreadPoolExecutor.AbortPolicy 預設拒絕執行處理器的新版本。

Java 文件 java.util.concurrent.ThreadPoolExecutor.ThreadPoolExecutor(int, int, long, java.util.concurrent.TimeUnit, java.util.concurrent.BlockingQueue<java.lang.Runnable>, java.util.concurrent.ThreadFactory)

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

適用於

ThreadPoolExecutor(Int32, Int32, Int64, TimeUnit, IBlockingQueue, IThreadFactory, IRejectedExecutionHandler)

建立 ThreadPoolExecutor 一個包含給定初始參數的新版本。

[Android.Runtime.Register(".ctor", "(IIJLjava/util/concurrent/TimeUnit;Ljava/util/concurrent/BlockingQueue;Ljava/util/concurrent/ThreadFactory;Ljava/util/concurrent/RejectedExecutionHandler;)V", "")]
public ThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, Java.Util.Concurrent.TimeUnit? unit, Java.Util.Concurrent.IBlockingQueue? workQueue, Java.Util.Concurrent.IThreadFactory? threadFactory, Java.Util.Concurrent.IRejectedExecutionHandler? handler);
[<Android.Runtime.Register(".ctor", "(IIJLjava/util/concurrent/TimeUnit;Ljava/util/concurrent/BlockingQueue;Ljava/util/concurrent/ThreadFactory;Ljava/util/concurrent/RejectedExecutionHandler;)V", "")>]
new Java.Util.Concurrent.ThreadPoolExecutor : int * int * int64 * Java.Util.Concurrent.TimeUnit * Java.Util.Concurrent.IBlockingQueue * Java.Util.Concurrent.IThreadFactory * Java.Util.Concurrent.IRejectedExecutionHandler -> Java.Util.Concurrent.ThreadPoolExecutor

參數

corePoolSize
Int32

即使執行緒處於閒置狀態,也必須保留在池中,除非 allowCoreThreadTimeOut 設定

maximumPoolSize
Int32

池中允許的最大執行緒數

keepAliveTime
Int64

當執行緒數超過核心時,這是多餘閒置執行緒等待新任務後終止的最大時間。

unit
TimeUnit

論證的時間 keepAliveTime 單位

workQueue
IBlockingQueue

用來在任務執行前保留的佇列。 此佇列僅 Runnable 存放方法提交的 execute 任務。

threadFactory
IThreadFactory

執行者建立新執行緒時使用的工廠

handler
IRejectedExecutionHandler

當執行阻塞時,處理程序會被阻塞,因為執行緒界限和佇列容量已達

屬性

備註

建立 ThreadPoolExecutor 一個包含給定初始參數的新版本。

Java 文件 java.util.concurrent.ThreadPoolExecutor.ThreadPoolExecutor(int, int, long, java.util.concurrent.TimeUnit, java.util.concurrent.BlockingQueue<java.lang.Runnable>, java.util.concurrent.ThreadFactory, java.util.concurrent.RejectedExecutionHandler)

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

適用於