ThreadPoolOption ThreadPoolOption ThreadPoolOption ThreadPoolOption Enum

定义

指示该工作(由 Activity 提交)当前正在哪一个线程池中运行。Indicates the thread pool in which the work, submitted by Activity, runs.

public enum class ThreadPoolOption
[System.Runtime.InteropServices.ComVisible(false)]
[System.Serializable]
public enum ThreadPoolOption
type ThreadPoolOption = 
Public Enum ThreadPoolOption
继承
ThreadPoolOptionThreadPoolOptionThreadPoolOptionThreadPoolOption
属性

字段

Inherit Inherit Inherit Inherit 1

线程池单元的类型与使用的调用方线程单元的类型相同。The same type of thread pool apartment as the caller's thread apartment is used.

MTA MTA MTA MTA 3

使用了多线程单元 (MTA)。A multithreaded apartment (MTA) is used.

None None None None 0

未使用线程池。No thread pool is used. 如果使用该值来配置传递给 ServiceConfigActivity,则将引发异常。If this value is used to configure a ServiceConfig that is passed to an Activity, an exception is thrown.

STA STA STA STA 2

正在使用单线程单元 (STA)。A single-threaded apartment (STA) is used.

注解

ThreadPoolOption 值使用ThreadPoolThreadPoolOption is used for the value of ThreadPool.

适用于