<Thread_UseAllCpuGroups > 元素<Thread_UseAllCpuGroups> Element

指定运行时是否跨所有 CPU 组分发托管的线程。Specifies whether the runtime distributes managed threads across all CPU groups.

<configuration> <configuration>
    <runtime >   <runtime>
     <Thread_UseAllCpuGroups >    <Thread_UseAllCpuGroups>

语法Syntax

<Thread_UseAllCpuGroups
   enabled="true|false"/>

特性和元素Attributes and Elements

下列各节描述了特性、子元素和父元素。The following sections describe attributes, child elements, and parent elements.

特性Attributes

特性Attribute 描述Description
enabled 必需的特性。Required attribute.

指定运行时是否跨所有 CPU 组分发托管的线程。Specifies whether the runtime distributes managed threads across all CPU groups.

enabled 特性enabled Attribute

“值”Value 描述Description
false 运行时不会跨多个 CPU 组分发托管线程。The runtime does not distribute managed threads across multiple CPU groups. 这是默认设置。This is the default.
true 如果计算机具有多个 CPU 组并且启用了<GCCpuGroup >元素,则运行时将跨多个 cpu 组分发托管线程。The runtime distributes managed threads across multiple CPU groups, if the computer has multiple CPU groups and the <GCCpuGroup> element is enabled.

子元素Child Elements

无。None.

父元素Parent Elements

元素Element 描述Description
configuration 公共语言运行时和 .NET Framework 应用程序所使用的每个配置文件中的根元素。The root element in every configuration file used by the common language runtime and .NET Framework applications.
runtime 包含有关程序集绑定和垃圾回收的信息。Contains information about assembly binding and garbage collection.

备注Remarks

如果计算机具有多个 CPU 组,则启用此元素会使运行时将托管线程分散到所有 CPU 组。When a computer has multiple CPU groups, enabling this element causes the runtime to distribute managed threads across all CPU groups. 若要使用此功能,还必须启用<GCCpuGroup >元素,该元素将垃圾回收扩展到所有 CPU 组,并在创建和平衡堆时考虑所有核心。To use this feature, you must also enable the <GCCpuGroup> element, which extends garbage collection to all CPU groups and takes all cores into account when creating and balancing heaps. 启用<GCCpuGroup >元素需要启用<r >元素。Enabling the <GCCpuGroup> element requires enabling the <gcServer> element. 如果未启用这些元素,则启用 <Thread_UseAllCpuGroups> 元素不起作用。If these elements are not enabled, enabling the <Thread_UseAllCpuGroups> element has no effect.

示例Example

下面的示例演示如何启用对多个 CPU 组的支持。The following example shows how to enable support for multiple CPU groups.

<configuration>
   <runtime>
      <Thread_UseAllCpuGroups enabled="true"/>
      <GCCpuGroup enabled="true"/>
      <gcServer enabled="true"/>
   </runtime>
</configuration>

请参阅See also